Commit Graph

3 Commits

Author SHA1 Message Date
Hajime Hoshi
f756be3d22 internal/devicescale: bug fix: glfw.Monitor.GetContentScale might return 0
Retrying to call GetContentScale solved this.

Closes #2051
2022-04-03 19:32:01 +09:00
divVerent
923c84a3d6
Split the concept of device scale and screen scale (#1811)
We now set deviceScale to always the mapping from logical window system pixels
to device independent pixels (which is what Ebiten API users expect), and
introduce a new concept of videoModeScale that maps from video mode to logical
window system pixels.

videoModeScale is now only used for computing full-screen resolutions, while
deviceScale is used for any other conversion.

Fixes window sizes on X11, should be a NOP otherwise.

Closes #1774.
2021-09-15 01:03:04 +09:00
divVerent
60df512352
Switch out the devicescale implementation by one that relies on glfw/xrandr. (#1800)
This should fix fullscreen mode on Linux/X11 systems in general,
while not affecting other systems.

Note that this deletes a bunch of OS X specific and Windows specific code,
as GLFW already provides this functionality.

This change is not expected to cause regressions, however,
the current behavior is still wrong and leads to wrong/unintended window sizes.
To be fixed in further PRs.

Updates #1774
2021-09-14 12:35:02 +09:00