Win32: only check joypads on arrival/disconnect
This commit is contained in:
parent
688c164fcb
commit
70cf3df1b4
@ -197,6 +197,7 @@
|
|||||||
#include <objidl.h>
|
#include <objidl.h>
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#include <Shobjidl.h>
|
#include <Shobjidl.h>
|
||||||
|
#include <dbt.h>
|
||||||
|
|
||||||
#include "wsnes9x.h"
|
#include "wsnes9x.h"
|
||||||
#include "win32_sound.h"
|
#include "win32_sound.h"
|
||||||
@ -2671,7 +2672,8 @@ LRESULT CALLBACK WinProc(
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case WM_DEVICECHANGE:
|
case WM_DEVICECHANGE:
|
||||||
S9xDetectJoypads();
|
if(wParam == DBT_DEVICEARRIVAL || wParam == DBT_DEVICEREMOVECOMPLETE)
|
||||||
|
S9xDetectJoypads();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return DefWindowProc (hWnd, uMsg, wParam, lParam);
|
return DefWindowProc (hWnd, uMsg, wParam, lParam);
|
||||||
|
Loading…
Reference in New Issue
Block a user