You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.0 Reported for operating system, platform: Mac OS X (All), x86
Comments on the original bug report:
On 2014-09-23 07:47:26 +0000, Rodrigo Cardoso wrote:
Created attachment 1878
patch that fixes the issue
I noticed that when you remove a joystick in cocoa, SDL marked it as closed internally even if it is not!
This caused an annoying issue that prevented the Joystick ID from being retrieved before closing it.
There is an one line patch attached that fixes the issue.
On 2014-09-23 08:12:36 +0000, Rodrigo Cardoso wrote:
Created attachment 1879
new patch
right after submitting the bug I noticed I was not getting the "release all buttons and center all axes" events that should be fired when removing a device, the new patch takes that into account.
notice that I left "joystick->closed" in the if even not relying in it anymore because I dont know if other platforms need it, just put an OR there.
On 2014-10-07 19:39:03 +0000, Rodrigo Cardoso wrote:
Just some more info on why I found this.
First I noticed that sometimes I was not getting the "release all buttons and center all axes" sometimes, and I was also trying to understand the purpose of SDL_JoystickGetAttached in the examples, since the joystick was invalidated before I get a change to get its instance ID and/or close it (at last on mac).
Preventing SDL to flag the joystick as 'closed' early fixed this problem.
After making this change, I was able to retrieve the instanceID correctly, so I could compare with the "which" field of the SDL_JOYDEVICEREMOVED event and close the joystick as I should, without keeping another copy of the instance id, and still got the release button events after that as I expected.
Also, as far as I understand only SDL_SYS_JoystickClose should change the ->closed to 1, right?
bye
On 2015-02-19 05:22:22 +0000, Ryan C. Gordon wrote:
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!
On 2015-03-24 01:16:52 +0000, Ryan C. Gordon wrote:
(In reply to Rodrigo Cardoso from comment # 2)
Also, as far as I understand only SDL_SYS_JoystickClose should change the
->closed to 1, right?
This appears to be true, and it looks like the Windows code has the same problem. I'll check this soon.
--ryan.
On 2015-03-24 17:55:28 +0000, Ryan C. Gordon wrote:
I ended up cleaning up a bunch of stuff in the joystick subsystem while trying to understand when and why we should be setting that "closed" flag. I ended up removing it altogether. :)
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
patch that fixes the issue (joystick_closed_patch.diff, text/plain, 2014-09-23 07:47:26 +0000, 397 bytes)new patch (joystick_closed_patch.diff, text/plain, 2014-09-23 08:12:36 +0000, 998 bytes)Reported in version: HG 2.0
Reported for operating system, platform: Mac OS X (All), x86
Comments on the original bug report:
On 2014-09-23 07:47:26 +0000, Rodrigo Cardoso wrote:
On 2014-09-23 08:12:36 +0000, Rodrigo Cardoso wrote:
On 2014-10-07 19:39:03 +0000, Rodrigo Cardoso wrote:
On 2015-02-19 05:22:22 +0000, Ryan C. Gordon wrote:
On 2015-03-24 01:16:52 +0000, Ryan C. Gordon wrote:
On 2015-03-24 17:55:28 +0000, Ryan C. Gordon wrote:
The text was updated successfully, but these errors were encountered: