diff --git a/emulator/src/extensions/touch/ext_touch.c b/emulator/src/extensions/touch/ext_touch.c index 97ea49df4..df4f4cc1f 100644 --- a/emulator/src/extensions/touch/ext_touch.c +++ b/emulator/src/extensions/touch/ext_touch.c @@ -258,22 +258,22 @@ static int32_t touchKey(uint32_t key, bool down) { // Map from state to touchpad rotation. Button bits are in URLD order const int32_t phiMap[] = { - 0, // 0b0000 ____ (0 radius) + 0, // 0b0000 ____ (0 radius) 270, // 0b0001 ___D 180, // 0b0010 __L_ 225, // 0b0011 __LD - 0, // 0b0100 _R__ + 0, // 0b0100 _R__ 315, // 0b0101 _R_D - 0, // 0b0110 _RL_ (0 radius) + 0, // 0b0110 _RL_ (0 radius) 270, // 0b0111 _RLD - 90, // 0b1000 U___ - 0, // 0b1001 U__D (0 radius) + 90, // 0b1000 U___ + 0, // 0b1001 U__D (0 radius) 135, // 0b1010 U_L_ 180, // 0b1011 U_LD - 45, // 0b1100 UR__ - 0, // 0b1101 UR_D - 90, // 0b1110 URL_ - 0, // 0b1111 URLD (0 radius) + 45, // 0b1100 UR__ + 0, // 0b1101 UR_D + 90, // 0b1110 URL_ + 0, // 0b1111 URLD (0 radius) }; if (key < '1' || key > '4') @@ -293,7 +293,7 @@ static int32_t touchKey(uint32_t key, bool down) emuTouch.keyState &= ~(1 << keyNum); } - int32_t radius = 1024; + int32_t radius = 1024; int32_t intensity = emuTouch.lastTouchIntensity; // Check for the canceled-out positions where switch (emuTouch.keyState) @@ -302,12 +302,12 @@ static int32_t touchKey(uint32_t key, bool down) case 6: // LR pressed case 9: // UD pressed case 15: // All pressed - radius = 0; - intensity = 0; - break; + radius = 0; + intensity = 0; + break; default: - break; + break; } emulatorSetTouchJoystick(phiMap[emuTouch.keyState], radius, intensity);