bmchtech / rengfx

lightweight, expressive, extensible multimedia engine
Apache License 2.0
82 stars 5 forks source link

Fix scaling issue on linux with high DPI monitor #21

Closed wilsonk closed 1 month ago

wilsonk commented 1 month ago

You may want to change names of variables or functions here. Fixes the issue, for all demos except multiscene, on Linux and works on MacOS M1 (not tested on Windows). Fixes issue #20

redthing1 commented 1 month ago

great, thanks for looking into it. I will have to test a bit and i'll merge it when im done. feel free to ping if i forget about it

redthing1 commented 1 month ago

Looks like I merged this prematurely, I found some breakage in celtest.

redthing1 commented 1 month ago

moved to fix-dpi branch

redthing1 commented 1 month ago

Sorry, looking at it more, I think the PR was totally broken to begin with. I rushed into merging it

wilsonk commented 1 month ago

Ah, actually I see a difference on my M1 for celtest now...perhaps I didn't recompile that one to test. Seems like the view is too close.

Pong is the same, but can be fixed with this patch and changing the actual ball/paddles/scores placements manually in the example code.

So, not totally sure how you wanted to fix this...but it seems like anything that is setting a view/scene offset by resolution will have some issues with this fix, as it is.