mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-07 02:40:23 +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)
|
||||
- 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.
|
||||
- PSP: Enable threading support through pthreads.
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#undef DIRECTINPUT_VERSION
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
|
||||
#define DBT_DEVNODES_CHANGED 0x0007
|
||||
|
||||
#ifndef WM_MOUSEHWHEEL
|
||||
#define WM_MOUSEHWHEEL 0x20e
|
||||
#endif
|
||||
@ -802,9 +804,12 @@ bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lPa
|
||||
return true;
|
||||
}
|
||||
case WM_DEVICECHANGE:
|
||||
if (di->joypad)
|
||||
di->joypad->destroy();
|
||||
di->joypad = input_joypad_init_driver(di->joypad_driver_name, di);
|
||||
if (wParam == DBT_DEVNODES_CHANGED)
|
||||
{
|
||||
if (di->joypad)
|
||||
di->joypad->destroy();
|
||||
di->joypad = input_joypad_init_driver(di->joypad_driver_name, di);
|
||||
}
|
||||
break;
|
||||
case WM_MOUSEWHEEL:
|
||||
if (((short) HIWORD(wParam))/120 > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user