KelvinShadewing / brux-gdk

Free runtime and development kit using SDL and Squirrel
GNU Affero General Public License v3.0
40 stars 20 forks source link

Letterbox mouse coordinate interference #2

Open KelvinShadewing opened 8 years ago

KelvinShadewing commented 8 years ago

When scaling a window so the aspect ratio no longer matches the game's, getting the mouse coordinates does not work properly anymore because the letterbox width/height changes the position of the game window. SDL2 appears to be getting mouse position from the top left of the window itself instead of the renderer.

jfmherokiller commented 4 years ago

https://stackoverflow.com/questions/26238701/sdl2-resizing-the-window-mouse-position