diff options
author | John Vilk <jvilk@cs.umass.edu> | 2013-11-19 21:16:52 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-19 18:22:45 -0800 |
commit | 814083f84a250a69ce66cf16ca38d0d7d425eee2 (patch) | |
tree | 17ef5ee1ec5fb9f87be2df036ee3e81b250d5459 /tests/sdl_joystick.c | |
parent | 4a54aa90277cebaf544f42cc9e0f2f4401e7ece4 (diff) |
[SDL] SDL_JoystickEventState should default to SDL_ENABLE, not SDL_DISABLE.
Diffstat (limited to 'tests/sdl_joystick.c')
-rw-r--r-- | tests/sdl_joystick.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/sdl_joystick.c b/tests/sdl_joystick.c index 50802c31..bdb621ab 100644 --- a/tests/sdl_joystick.c +++ b/tests/sdl_joystick.c @@ -72,6 +72,10 @@ void main_2(void* arg) { assert(SDL_JoystickNumAxes(pad1) == 4); assert(SDL_JoystickNumButtons(pad1) == 16); + // By default, SDL will automatically process events. Test this behavior, and then disable it. + assert(SDL_JoystickEventState(SDL_QUERY) == SDL_ENABLE); + SDL_JoystickEventState(SDL_DISABLE); + assert(SDL_JoystickEventState(SDL_QUERY) == SDL_DISABLE); // Button events. emscripten_run_script("window.simulateGamepadButtonDown(0, 1)"); // We didn't tell SDL to automatically update this joystick's state. |