mirror of https://github.com/snes9xgit/snes9x.git
Win32: register for all device changes, ignore problematic message
This commit is contained in:
parent
1661fc838c
commit
09df5e1406
|
@ -2712,7 +2712,7 @@ LRESULT CALLBACK WinProc(
|
|||
break;
|
||||
#endif
|
||||
case WM_DEVICECHANGE:
|
||||
if(wParam == DBT_DEVICEARRIVAL || wParam == DBT_DEVICEREMOVECOMPLETE || wParam == DBT_DEVNODES_CHANGED)
|
||||
if(wParam == DBT_DEVICEARRIVAL || wParam == DBT_DEVICEREMOVECOMPLETE)
|
||||
PostMessage(hWnd, WM_SCANJOYPADS, 0, 0);
|
||||
break;
|
||||
case WM_SCANJOYPADS:
|
||||
|
@ -3412,6 +3412,12 @@ int WINAPI WinMain(
|
|||
SetMenu (GUI.hWnd, NULL);
|
||||
}
|
||||
|
||||
DEV_BROADCAST_DEVICEINTERFACE notificationFilter;
|
||||
ZeroMemory(¬ificationFilter, sizeof(notificationFilter));
|
||||
notificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
|
||||
notificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
|
||||
RegisterDeviceNotification(GUI.hWnd, ¬ificationFilter, DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
|
||||
|
||||
InitRenderFilters();
|
||||
|
||||
GUI.ControlForced = 0xff;
|
||||
|
|
Loading…
Reference in New Issue