mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-08 21:55:13 +00:00
Fix RAWINPUT struct size on 64 bit windows
This commit is contained in:
parent
59f141d4e5
commit
4060f8c046
|
@ -2251,13 +2251,11 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||||
static RAWINPUTDEVICE Rid[1];
|
static RAWINPUTDEVICE Rid[1];
|
||||||
case WM_INPUT:
|
case WM_INPUT:
|
||||||
{
|
{
|
||||||
|
if (raw_setup){
|
||||||
|
//QB64
|
||||||
if (raw_setup){
|
//adapted from http://msdn.microsoft.com/en-us/library/windows/desktop/ee418864%28v=vs.85%29.aspx#WM_INPUT
|
||||||
//QB64
|
UINT dwSize = sizeof(RAWINPUT);
|
||||||
//adapted from http://msdn.microsoft.com/en-us/library/windows/desktop/ee418864%28v=vs.85%29.aspx#WM_INPUT
|
static BYTE lpb[sizeof(RAWINPUT)];
|
||||||
UINT dwSize = 40;
|
|
||||||
static BYTE lpb[40];
|
|
||||||
GetRawInputData((HRAWINPUT)lParam, RID_INPUT,
|
GetRawInputData((HRAWINPUT)lParam, RID_INPUT,
|
||||||
lpb, &dwSize, sizeof(RAWINPUTHEADER));
|
lpb, &dwSize, sizeof(RAWINPUTHEADER));
|
||||||
RAWINPUT* raw = (RAWINPUT*)lpb;
|
RAWINPUT* raw = (RAWINPUT*)lpb;
|
||||||
|
@ -2268,9 +2266,8 @@ if (raw_setup){
|
||||||
if (xPosRelative||yPosRelative) qb64_custom_event(QB64_EVENT_RELATIVE_MOUSE_MOVEMENT,xPosRelative,yPosRelative,0,0,0,0,0,0,NULL,NULL);
|
if (xPosRelative||yPosRelative) qb64_custom_event(QB64_EVENT_RELATIVE_MOUSE_MOVEMENT,xPosRelative,yPosRelative,0,0,0,0,0,0,NULL,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue