Win32: only check joypads on arrival/disconnect

This commit is contained in:
OV2 2015-02-27 20:23:31 +01:00
parent 688c164fcb
commit 70cf3df1b4

View File

@ -197,6 +197,7 @@
#include <objidl.h>
#include <shlwapi.h>
#include <Shobjidl.h>
#include <dbt.h>
#include "wsnes9x.h"
#include "win32_sound.h"
@ -2671,6 +2672,7 @@ LRESULT CALLBACK WinProc(
break;
#endif
case WM_DEVICECHANGE:
if(wParam == DBT_DEVICEARRIVAL || wParam == DBT_DEVICEREMOVECOMPLETE)
S9xDetectJoypads();
break;
}