Page 1 of 1

Fullscreen Resolution incorrect when using windows scaling

Posted: Wed Dec 14, 2022 11:14 am
by TheLoneNeighbour
Most laptops running windows automatically have scaling set to 125%
With this love2d seems to run at 1536 x 984 instead of 1920 x 1080 for example.
Is there any way to get it to run at the native screen resolution instead?

Re: Fullscreen Resolution incorrect when using windows scaling

Posted: Wed Dec 14, 2022 1:41 pm
by MrFariator
Here's a relevant forum post, although I'm not sure how up-to-date that information is. You may try love.graphics.getDPIScale, but I'm not sure if it helps on Windows.

Re: Fullscreen Resolution incorrect when using windows scaling

Posted: Fri Dec 16, 2022 6:36 am
by zorg
TheLoneNeighbour wrote: Wed Dec 14, 2022 11:14 am Most laptops running windows automatically have scaling set to 125%
That would be a windows issue... anyway, currently, with 11.4, DPI scaling doesn't work in windows, don't remember if the upcoming 12.0 version will fix that or not.

Re: Fullscreen Resolution incorrect when using windows scaling

Posted: Fri Jan 06, 2023 7:42 pm
by Sasha264
I was worried about that problem five years ago:
viewtopic.php?p=217166#p217166

Since then I live with scary bat file with something like that:

Code: Select all

REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V "O:\my_love_lives_here\win64\love.exe" /T REG_SZ /D ~HIGHDPIAWARE /F
@pause
Use at your own risk, or just do the same by hands like that:
download/file.php?id=15840
(Note that not only Love2d have that issue. Like 30% of my Steam games require that :ehem:)

Re: Fullscreen Resolution incorrect when using windows scaling

Posted: Fri Jan 06, 2023 11:48 pm
by elfrea
One could simply
- rightclick the 'love.exe' file, (probably in c:\program files\LOVE\)
- click 'properties'
- click 'Compatibility' tab
- click 'Change high DPI settings'
- check 'Override high DPI scaling behavior' and select 'scaling performed by Application'