preserve per-event mouse coordinates; prefer in ui signal producing codepath

This commit is contained in:
Ryan Fleury
2024-01-23 20:17:50 -08:00
parent be252406bd
commit 959550151a
3 changed files with 11 additions and 2 deletions
+1
View File
@@ -71,6 +71,7 @@ struct OS_Event
B32 right_sided;
U32 character;
U32 repeat_count;
Vec2F32 pos;
Vec2F32 delta;
String8List strings;
};
+2
View File
@@ -416,6 +416,8 @@ w32_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
event->key = OS_Key_RightMouseButton;
}break;
}
event->pos.x = (F32)LOWORD(lParam);
event->pos.y = (F32)HIWORD(lParam);
if(release)
{
ReleaseCapture();