From 84dc5d98ef9f7bd45b83e4423805fdd26ee972b3 Mon Sep 17 00:00:00 2001 From: evilynux Date: Sat, 21 Apr 2007 17:34:03 +0000 Subject: [PATCH] Cleanly closing opened joysticks. --- desmume/src/ctrlssdl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/desmume/src/ctrlssdl.c b/desmume/src/ctrlssdl.c index b0d1d746a..33ea26b4b 100644 --- a/desmume/src/ctrlssdl.c +++ b/desmume/src/ctrlssdl.c @@ -118,9 +118,10 @@ void set_kb_keys(u16 kbCfg[]) /* Unload joysticks */ void uninit_joy() { - /* FIXME: Should we Close all joysticks? - SDL_JoystickClose( ... ); - */ + int i; + printf("Disabling joystick support.\n"); + for (i = 0; i < SDL_NumJoysticks(); i++) + SDL_JoystickClose(i); SDL_QuitSubSystem(SDL_INIT_JOYSTICK); }