From 7a63e597fbcd5c52575277e0bf5404db13366c22 Mon Sep 17 00:00:00 2001 From: Patrick McIlroy Date: Tue, 4 Mar 2008 16:39:14 +0000 Subject: [PATCH] git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg@95 83fadc84-e282-4d84-a09a-c4228d6ae7e5 --- src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp b/src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp index e9061e4a..6561126d 100644 --- a/src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp +++ b/src/arch/InputHandler/InputHandler_Linux_PIUIO.cpp @@ -161,6 +161,17 @@ void InputHandler_Linux_PIUIO::HandleInput() } } +CString SensorDescriptions[] = {"right", "left", "bottom", "top"}; + +CString GetSensorDescription(int bits) { + if (bits == 0) return ""; + CStringArray retSensors; + for(int i = 0; i < 3; i++) { + if (bits & (1 << i)) retSensors.push_back(SensorDescriptions[i]); + } + return join(", ", retSensors); +} + /* Requires "LightsDriver=ext" */ void InputHandler_Linux_PIUIO::UpdateLights() { -- 2.11.0