Hi all!
Can you please download the .love file and attach the screen shot.
It will be very helpful to know the typical displays.
Mobile phone display resolution
Mobile phone display resolution
- Attachments
-
- mobile-phone-love2D.love
- (406 Bytes) Downloaded 70 times
Re: Mobile phone display resolution
Can't quite see the top line, think it says 411.
Re: Mobile phone display resolution
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Re: Mobile phone display resolution
It was!milon wrote: ↑Fri Sep 15, 2023 7:43 pmdarkfrei, why not just love.window.getSafeArea?
Screenshot_20230915-154119.png
Code: Select all
function love.draw ()
local x, y, w, h = love.window.getSafeArea( )
love.graphics.print ('graphics.width '.. love.graphics.getWidth (), x, y)
love.graphics.print ('graphics.gheight '.. love.graphics.getHeight (), x, y+14)
local width, height = love.window.getDesktopDimensions()
love.graphics.print ('window.width '.. width, x, y+2*14)
love.graphics.print ('window.gheight '.. height, x, y+3*14)
love.graphics.print ('safe.x '.. x, x, y+4*14)
love.graphics.print ('safe.y '.. y, x, y+5*14)
love.graphics.print ('safe.width '.. w, x, y+6*14)
love.graphics.print ('safe.height '.. h, x, y+7*14)
end
Re: Mobile phone display resolution
Why don't you just google some popular smartphones and pick something with most widely used resolution or something?
Re: Mobile phone display resolution
Wow, my bad! I looked for it but totally missed it anyway.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Who is online
Users browsing this forum: No registered users and 2 guests