Add 'usedpiscale' boolean (true by default) to love.window.setMode's settings table and love.conf's t.window table. Add love.window.getNativeDPIScale.

When usedpiscale=false, love will no longer automatically scale coordinates by the screen's DPI scale factor (so all coordinates will be in pixels), even when highdpi=true. love.window.getDPIScale will return 1, love.graphics.newCanvas will default to a dpi scale of 1 instead of the screen's dpi scale, etc.

love.window.getNativeDPIScale() will return the screen's DPI scale as reported by the OS no matter what usedpiscale is set to.
This commit is contained in:
Alex Szpakowski
2019-06-24 21:54:09 -03:00
parent 2e6644fd44
commit 37472d6f5e
7 changed files with 30 additions and 0 deletions
+1
View File
@@ -104,6 +104,7 @@ StringMap<Window::Setting, Window::SETTING_MAX_ENUM>::Entry Window::settingEntri
{"centered", SETTING_CENTERED},
{"display", SETTING_DISPLAY},
{"highdpi", SETTING_HIGHDPI},
{"usedpiscale", SETTING_USE_DPISCALE},
{"refreshrate", SETTING_REFRESHRATE},
{"x", SETTING_X},
{"y", SETTING_Y},