fix upscaling of small resolutions

This commit is contained in:
Fabian 2023-01-06 15:13:33 +01:00
parent dd6dbb9d79
commit c7a78029f9

View file

@ -349,7 +349,9 @@ function ScreenAdapter(screen_container, bus)
graphic_screen.height = height;
// add some scaling to tiny resolutions
if(width <= 640 && width * 2 < window.innerWidth && width * 2 < window.innerHeight)
if(width <= 640 &&
width * 2 < window.innerWidth * window.devicePixelRatio &&
height * 2 < window.innerHeight * window.devicePixelRatio)
{
base_scale = 2;
}