ultraq / redhorizon

Recreating the original 2D Command & Conquer games
Apache License 2.0
6 stars 4 forks source link

Multi-monitor window sizing #31

Closed ultraq closed 4 years ago

ultraq commented 4 years ago

The auto-window-sizing thing only uses the primary monitor to set the resolution of the window, which has problems when, for example, I launch the program on the smaller secondary screen and it appears there but in a resolution too big for it.

To fix this, I think I need to use GLFW's monitor API to first discover which monitor the window is targeting, and then resize appropriately.

ultraq commented 4 years ago

So the API only returns which monitor a window is on if it's in fullscreen mode 😕 Will have to think of something else...