mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-08 03:20:22 +00:00
avoid dinput reinitialization on unrelated WM_DEVICECHANGE events
This commit is contained in:
parent
fee7ab9dc8
commit
ab54fda509
@ -1,5 +1,6 @@
|
|||||||
# 1.7.1 (future)
|
# 1.7.1 (future)
|
||||||
- COMMON: Fix menu toggle with keymapper active.
|
- DINPUT: don't reinitialize input driver on network events / media insertion / network drive connection
|
||||||
|
- KEYMAPPER: prevent a condition that caused input_menu_toggle to stop working when a RETRO_DEVICE_KEYBOARD type device is enabled
|
||||||
- PS3: Enable Cheevos.
|
- PS3: Enable Cheevos.
|
||||||
- PSP: Enable threading support through pthreads.
|
- PSP: Enable threading support through pthreads.
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
#undef DIRECTINPUT_VERSION
|
#undef DIRECTINPUT_VERSION
|
||||||
#define DIRECTINPUT_VERSION 0x0800
|
#define DIRECTINPUT_VERSION 0x0800
|
||||||
|
|
||||||
|
#define DBT_DEVNODES_CHANGED 0x0007
|
||||||
|
|
||||||
#ifndef WM_MOUSEHWHEEL
|
#ifndef WM_MOUSEHWHEEL
|
||||||
#define WM_MOUSEHWHEEL 0x20e
|
#define WM_MOUSEHWHEEL 0x20e
|
||||||
#endif
|
#endif
|
||||||
@ -802,9 +804,12 @@ bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lPa
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case WM_DEVICECHANGE:
|
case WM_DEVICECHANGE:
|
||||||
if (di->joypad)
|
if (wParam == DBT_DEVNODES_CHANGED)
|
||||||
di->joypad->destroy();
|
{
|
||||||
di->joypad = input_joypad_init_driver(di->joypad_driver_name, di);
|
if (di->joypad)
|
||||||
|
di->joypad->destroy();
|
||||||
|
di->joypad = input_joypad_init_driver(di->joypad_driver_name, di);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case WM_MOUSEWHEEL:
|
case WM_MOUSEWHEEL:
|
||||||
if (((short) HIWORD(wParam))/120 > 0)
|
if (((short) HIWORD(wParam))/120 > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user