Emscripten: Fixed opening previously closed joystick.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 17 Aug 2016 21:04:50 +0200
changeset 10275 ba7dc3ebb81e
parent 10274 3501018c6df2
child 10276 1448f9484494
Emscripten: Fixed opening previously closed joystick.
src/joystick/emscripten/SDL_sysjoystick.c
--- a/src/joystick/emscripten/SDL_sysjoystick.c	Wed Aug 17 21:04:32 2016 +0200
+++ b/src/joystick/emscripten/SDL_sysjoystick.c	Wed Aug 17 21:04:50 2016 +0200
@@ -377,6 +377,8 @@
 void
 SDL_SYS_JoystickClose(SDL_Joystick * joystick)
 {
+    SDL_joylist_item *item = (SDL_joylist_item *) joystick->hwdata;
+    item->joystick = NULL;
 }
 
 /* Function to perform any system-specific joystick related cleanup */