From dc877ea766fc682b9ada6875e26384fcd6725fec Mon Sep 17 00:00:00 2001 From: rsn8887 Date: Mon, 26 Dec 2016 21:46:31 -0600 Subject: [PATCH] Vita: - updated autocentering of analog sticks so that both sticks are always auto-centered, not just the one that controls the mouse --- src/gui.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui.cpp b/src/gui.cpp index d9a4864..c0863c3 100755 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -566,6 +566,11 @@ void gui_handle_events (void) //From now on only center when entering menu haveJoysticksBeenCentered=1; } + + lAnalogX=lAnalogX-lAnalogXCenter; + lAnalogY=lAnalogY-lAnalogYCenter; + rAnalogX=rAnalogX-rAnalogXCenter; + rAnalogY=rAnalogY-rAnalogYCenter; if (mainMenu_leftStickMouse) { dpadRight = SDL_JoystickGetButton(uae4all_joy0, 9) @@ -576,8 +581,6 @@ void gui_handle_events (void) || (rAnalogY < -1024*10) ? 1 : 0; dpadDown = SDL_JoystickGetButton(uae4all_joy0, 6) || (rAnalogY > 1024*10) ? 1 : 0; - lAnalogX=lAnalogX-lAnalogXCenter; - lAnalogY=lAnalogY-lAnalogYCenter; } else { @@ -589,8 +592,6 @@ void gui_handle_events (void) || (lAnalogY < -1024*10) ? 1 : 0; dpadDown = SDL_JoystickGetButton(uae4all_joy0, 6) || (lAnalogY > 1024*10) ? 1 : 0; - rAnalogX=rAnalogX-rAnalogXCenter; - rAnalogY=rAnalogY-rAnalogYCenter; } buttonA = SDL_JoystickGetButton(uae4all_joy0, PAD_SQUARE);