mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-05 23:10:58 +00:00
The event filter and event watch functions are now thread-safe
This commit is contained in:
parent
37d89aa10f
commit
b647bd0692
3 changed files with 116 additions and 73 deletions
|
@ -601,10 +601,7 @@ void SDL_PrivateJoystickAdded(int device_index)
|
|||
|
||||
if (SDL_GetEventState(event.type) == SDL_ENABLE) {
|
||||
event.jdevice.which = device_index;
|
||||
if ((SDL_EventOK == NULL) ||
|
||||
(*SDL_EventOK) (SDL_EventOKParam, &event)) {
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
#endif /* !SDL_EVENTS_DISABLED */
|
||||
}
|
||||
|
@ -647,10 +644,7 @@ void SDL_PrivateJoystickRemoved(SDL_JoystickID device_instance)
|
|||
|
||||
if (SDL_GetEventState(event.type) == SDL_ENABLE) {
|
||||
event.jdevice.which = device_instance;
|
||||
if ((SDL_EventOK == NULL) ||
|
||||
(*SDL_EventOK) (SDL_EventOKParam, &event)) {
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
UpdateEventsForDeviceRemoval();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue