diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-07 10:37:25 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-07 10:37:25 -0500 |
commit | 1a007b1631509b9d72499a8f4402294017ee04dc (patch) | |
tree | 92f8b0341497c7bd4e53aa82c690346536a244c3 /tests/sdl_joystick.c | |
parent | df11c6f1fd1636a355b83a1c48b3a890596e6a32 (diff) | |
parent | eb083723747a90cb6ab9853fec8d6e8ef54748bc (diff) |
Merge branch 'incoming'
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. |