Display hat switches properly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2149 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
73718b3733
commit
ccd2f024b5
@ -341,6 +341,13 @@ MA 02110-1301, USA.
|
||||
desc=[NSString stringWithFormat: @"Stick %d axis %d",
|
||||
stickNumber+1, thingNumber+1];
|
||||
}
|
||||
else if(thingNumber >= MAX_REAL_BUTTONS)
|
||||
{
|
||||
static const char dir[][6] = { "up", "right", "down", "left" };
|
||||
desc=[NSString stringWithFormat: @"Stick %d hat %d %s",
|
||||
stickNumber+1, (thingNumber - MAX_REAL_BUTTONS) / 4 + 1,
|
||||
dir[thingNumber & 3]];
|
||||
}
|
||||
else
|
||||
{
|
||||
desc=[NSString stringWithFormat: @"Stick %d button %d",
|
||||
|
Loading…
x
Reference in New Issue
Block a user