Windows: Check for devices on Windows events only.

A user reported stuttering after the periodic checks, and devices failing
until unplug/replug.  Presumably, this is caused by poor drivers reacting
badly to periodic DirectInput queries, so less queries should help.
This commit is contained in:
Unknown W. Brackets authored and Henrik Rydgård committed 2018-11-03 17:37:22 +01:00
1 parent fdb07323e0
commit c9aa039695
3 files changed
+14 -2

No files matched your search

+5
View File
@@ -54,6 +54,7 @@
#include "Windows/GEDebugger/GEDebugger.h"
#include "Windows/main.h"
#include "Windows/DinputDevice.h"
#include "Windows/EmuThread.h"
#include "Windows/resource.h"
@@ -814,6 +815,10 @@ namespace MainWindow
case WM_CHAR:
return WindowsRawInput::ProcessChar(hWnd, wParam, lParam);
case WM_DEVICECHANGE:
DinputDevice::CheckDevices();
return DefWindowProc(hWnd, message, wParam, lParam);
case WM_VERYSLEEPY_MSG:
switch (wParam) {
case VERYSLEEPY_WPARAM_SUPPORTED: