We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2873

Summary: Joystick test won't reload after reattach
Product: SDL Reporter: lectem
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: philipp.wiesemann
Version: HG 2.1   
Hardware: All   
OS: All   

Description lectem 2015-02-09 13:30:36 UTC
-plug in the joystick
-start testjoystick 0
-unplug
-replug

The joystick is detected but doesn't enter the loop anymore since done==SDL_TRUE

Quick patch :

--- testjoystick.c	lun. févr.  9 14:26:26 2015
+++ testjoystick.c.mine	lun. févr.  9 14:24:50 2015
@@ -176,8 +176,8 @@ WatchJoystick(SDL_Joystick * joystick)
 {
     SDL_Window *window = NULL;
     const char *name = NULL;
+	done = SDL_FALSE;
 
-
     /* Create a window to display joystick axis position */
     window = SDL_CreateWindow("Joystick Test", SDL_WINDOWPOS_CENTERED,
                               SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,
Comment 1 Philipp Wiesemann 2015-02-10 19:46:38 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/86bc1c9a090f