The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.
SDL
Simple Directmedia Layer Forums
Cant use SDL Joystick API on a background thread anymore?
RodrigoCard
Joined: 23 Apr 2011
Posts: 113
Location: Brazil
Posted: Wed Sep 17, 2014 10:21 pm
I have a MAC application that Uses SDL2 only for joystick handling.
It used code from before the code was refactored to allow hotpluging.
For some reason I dont remember, the event loop runs in a Background Thread
(since it was used only for joystick stuff and I disabled all other events, that was no problem).
I decided to update my code to get Hot Plug support and discovered it only gets (dis)connect events when I pump from the main thread.
So, my question:
Is that possible to make it work in a background thread as the other joystick events?