Transparency option for on-screen keyboard, also swapped joystick axis as it is used this way in most games
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user