Transparency option for on-screen keyboard, also swapped joystick axis as it is used this way in most games

This commit is contained in:
pelya
2010-12-22 17:16:39 +00:00
parent 80d778b68f
commit 420852470c
7 changed files with 75 additions and 62 deletions

View File

@@ -817,9 +817,6 @@ VControl_ProcessJoyAxis (int port, int axis, int value)
int t;
if (!joysticks[port].stick)
return;
#ifdef ANDROID
value = -value; // Axes are swapped, too lazy to fix that on SDL side
#endif
joysticks[port].axes[axis].value = value;
t = joysticks[port].threshold;
if (value > t)

View File

@@ -568,7 +568,7 @@ BATTLE_INPUT_STATE GetDirectionalJoystickInput(int direction)
angle -= atan2i_PI * 2;
angle = angle * SHIP_DIRECTIONS / atan2i_PI / 2;
diff = angle - direction - SHIP_DIRECTIONS / 4;
diff = angle - direction + SHIP_DIRECTIONS / 4;
while( diff >= SHIP_DIRECTIONS )
diff -= SHIP_DIRECTIONS;
while( diff < 0 )