feat(event): handle normal mouse move events for windows

This commit is contained in:
fallenoak 2023-03-17 22:03:06 -05:00
parent dbf840e6ad
commit 7f70ecd225

View File

@ -10,6 +10,10 @@ void RestoreMouse() {
// TODO
}
void SaveMouse(POINT mousePos, HWND hwnd) {
// TODO
}
int32_t OsGuiProcessMessage(void* message) {
// TODO
return 0;
@ -106,6 +110,20 @@ int32_t OsWindowProc(void* window, uint32_t message, uintptr_t wparam, intptr_t
return 0;
}
case WM_MOUSEMOVE: {
// TODO
if (Input::s_osMouseMode == OS_MOUSE_MODE_RELATIVE) {
// TODO
} else {
POINT mousePos;
GetCursorPos(&mousePos);
ScreenToClient(hwnd, &mousePos);
OsQueuePut(OS_INPUT_MOUSE_MOVE, 0, mousePos.x, mousePos.y, 0);
SaveMouse(mousePos, hwnd);
}
}
default:
break;
}