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 - Joystick test won't reload after reattach
Summary: Joystick test won't reload after reattach
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.1
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-09 13:30 UTC by lectem
Modified: 2015-02-10 19:46 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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