Closed JL2210 closed 2 weeks ago
Decided to mark this as a draft until it can be tested on Mac/with controllers/etc
I think I also need to put in a fix to properly set the window size. Right now it's setting the window size rather than the framebuffer size, I think the intended behavior is to set the framebuffer -- EDIT -- upon further inspection, it appears this behavior matches that of modern vanilla, even if not matching up perfectly with X. At worst it's a minor annoyance, so I'll leave it be.
Tested and appears to work as normal on Mac. Definitely improved Linux experience.
I think there might be a bug in the implementation of getPixelScaleFactor
on x11 and Windows, please don't merge
Ready for review again
The game expects
getWidth
andgetHeight
to return framebuffer coordinates rather than screen-space coordinates (as shown by the calls toglViewport
). This was broken on scaling factors greater than 1 but also masked byGL_SCALE_FRAMEBUFFER
.Additionally, the game's mouse code also expects framebuffer coordinates to be returned. This fixes that by converting to and from screen-space during calls to mouse code.
Disable
GLFW_COCOA_RETINA_FRAMEBUFFER
for now, it seems to not play nice on non-MacOS systems. At least for me it makes the title screen much larger than the window when playing in fullscreen.Screenshot before the change:
Screenshot after the change:
Before is marginally fuzzier (and obviously doesn't work with the title screen)