mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
Enable dispatching of WM_INPUT_DEVICE_CHANGE events directly, in case the application hasn't created a window with the normal message loop
This commit is contained in:
parent
e8adc64810
commit
8973a25849
@ -642,7 +642,7 @@ RAWINPUT_GetPendingDeviceChanges(void)
|
|||||||
|
|
||||||
static SDL_bool pump_device_events;
|
static SDL_bool pump_device_events;
|
||||||
static void
|
static void
|
||||||
RAWINPUT_GetPendingDeviceEvents(void)
|
RAWINPUT_GetPendingDeviceInput(void)
|
||||||
{
|
{
|
||||||
if (pump_device_events) {
|
if (pump_device_events) {
|
||||||
MSG msg;
|
MSG msg;
|
||||||
@ -985,6 +985,8 @@ RAWINPUT_IsDevicePresent(Uint16 vendor_id, Uint16 product_id, Uint16 version, co
|
|||||||
static void
|
static void
|
||||||
RAWINPUT_JoystickDetect(void)
|
RAWINPUT_JoystickDetect(void)
|
||||||
{
|
{
|
||||||
|
RAWINPUT_GetPendingDeviceChanges();
|
||||||
|
|
||||||
RAWINPUT_PostUpdate();
|
RAWINPUT_PostUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1722,7 +1724,7 @@ RAWINPUT_UpdateOtherAPIs(SDL_Joystick *joystick)
|
|||||||
static void
|
static void
|
||||||
RAWINPUT_JoystickUpdate(SDL_Joystick *joystick)
|
RAWINPUT_JoystickUpdate(SDL_Joystick *joystick)
|
||||||
{
|
{
|
||||||
RAWINPUT_GetPendingDeviceEvents();
|
RAWINPUT_GetPendingDeviceInput();
|
||||||
|
|
||||||
RAWINPUT_UpdateOtherAPIs(joystick);
|
RAWINPUT_UpdateOtherAPIs(joystick);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user