windows: fix vsync logspam when window is minimized #134

Merged
MartinFouilleul merged 1 commits from fix-minimize-logspam into main 2023-09-19 06:43:12 +00:00
Collaborator

When a window is minimized, it isn't present on any monitor, so this log would get spammed every frame:

Warning: E:\Dev\handmade\orca\src\graphics/win32_vsync.c() in oc_vsync_wait:153: No outputs found. Were all monitors unplugged?

This change falls back to the last found monitor, if there is one, to avoid hogging the CPU, and removes the logspam.

When a window is minimized, it isn't present on any monitor, so this log would get spammed every frame: ``` Warning: E:\Dev\handmade\orca\src\graphics/win32_vsync.c() in oc_vsync_wait:153: No outputs found. Were all monitors unplugged? ``` This change falls back to the last found monitor, if there is one, to avoid hogging the CPU, and removes the logspam.
MartinFouilleul force-pushed fix-minimize-logspam from 6a6e566686 to ea74114693 2023-09-19 06:43:00 +00:00 Compare
MartinFouilleul merged commit ea74114693 into main 2023-09-19 06:43:12 +00:00
MartinFouilleul deleted branch fix-minimize-logspam 2023-09-19 06:43:12 +00:00
Sign in to join this conversation.
No reviewers
No Label
macOS
windows
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hmn/orca#134
No description provided.