iOS: Try to fix analog stick getting stuck. Blind fix :)

This commit is contained in:
Henrik Rydgard 2013-03-31 14:21:04 +02:00
parent 7e72671292
commit 3bd5146fbf
2 changed files with 6 additions and 0 deletions

View File

@ -108,6 +108,8 @@ void Core_RunLoop()
input_state.pad_buttons = 0;
input_state.pad_lstick_x = 0;
input_state.pad_lstick_y = 0;
input_state.pad_rstick_x = 0;
input_state.pad_rstick_y = 0;
// Temporary hack.
if (GetAsyncKeyState(VK_ESCAPE)) {
input_state.pad_buttons |= PAD_BUTTON_MENU;

View File

@ -167,6 +167,10 @@ ViewController* sharedViewController;
lock_guard guard(input_state.lock);
pad_buttons_down |= pad_buttons_async_set;
pad_buttons_down &= ~pad_buttons_async_clear;
input_state.pad_lstick_x = 0;
input_state.pad_lstick_y = 0;
input_state.pad_rstick_x = 0;
input_state.pad_rstick_y = 0;
input_state.pad_buttons = pad_buttons_down;
UpdateInputState(&input_state);
}