The current behaviour assumes that scaling between window coordinates and drawable pixels are the same in highdpi mode; which isn't true on MacOS and causes the game to render only to the lower left quadrant of the screen on so-called "retina" machines.
This PR adds a case to set the viewport size to the window's actual drawable space as reported by SDL_GL_GetDrawableSize when using SDL2 & OpenGL, I left the non-GL SDL2 logic alone because SDL_RenderSetLogicalSize already handles this correctly.
Fixes the scaling issue seen in this post in #133
The current behaviour assumes that scaling between window coordinates and drawable pixels are the same in highdpi mode; which isn't true on MacOS and causes the game to render only to the lower left quadrant of the screen on so-called "retina" machines. This PR adds a case to set the viewport size to the window's actual drawable space as reported by SDL_GL_GetDrawableSize when using SDL2 & OpenGL, I left the non-GL SDL2 logic alone because SDL_RenderSetLogicalSize already handles this correctly.
Tested with both sw and hw modes.