Hi!
I am currently experimenting with Love2D on iOS using an iOS Simulator. I am trying to understand how resolution and different aspect ratios works and I have noticed the resolution seems to be off.
I have created an iPhone SE 3rd gen Simulator and the resolution of the device is 640 x 1136.
However it seems in Love2D I need to set the resolution to 374 x 664 in order to get a proper render. If I use any other resolution like 640 x 1136, the screen does not look right, it crushed or stretched.
I create a canvas of size 373 x 664 and also setMode(373,664) and this is how I get proper look. But it is not what I would expect considering the resolution of the device is 640 x 1136. I am a little confused about this. Would anyone have any pointers how to handle resolution on iOS devices?
Thank you.
How to handle resolution on iOS devices?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: How to handle resolution on iOS devices?
It's probably the same as In Android. A scale is applied to all coordinates; love.graphics.getDimensions() should give you 374x664. The scale is given by love.graphics.getDPIScale(). You can disable this behaviour in love.conf:
Code: Select all
function love.conf(c)
c.window.usedpiscale = false
end
Re: How to handle resolution on iOS devices?
Thanks a lot. I forgot completely about DPI scale.
Who is online
Users browsing this forum: Ahrefs [Bot] and 12 guests