Skip to content

Commit

Permalink
Vita: - updated autocentering of analog sticks so that both sticks ar…
Browse files Browse the repository at this point in the history
…e always auto-centered, not just the one that controls the mouse
  • Loading branch information
rsn8887 committed Dec 27, 2016
1 parent f561802 commit dc877ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui.cpp
Expand Up @@ -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)
Expand All @@ -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
{
Expand All @@ -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);
Expand Down

0 comments on commit dc877ea

Please sign in to comment.