android sotfkeys block getDesktopDimensions() function

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
crystal
Prole
Posts: 9
Joined: Sat Sep 30, 2017 9:53 pm

android sotfkeys block getDesktopDimensions() function

Post by crystal » Wed Jan 16, 2019 2:41 pm

hi
im trying to get dimension on android device by using
windowWidth, windowHeight = love.window.getDesktopDimensions()
it works fine on tablet without softkeys, but the problem is phone with softkeys
my game runs in fullscreen but getDesktopDimensions() function does not giving me real resolution dimensions
i tested it by drawing a line on windowHeight coordinates and it lands exactly above softkeys boundaries

first i thought maybe its cause i was using setMode(windowW, windowH,{fullscreen = true}) after getDesktopDimensions()
so i put fullscreen flag in conf.lua but still the result is the same

using 10.2 version

crystal
Prole
Posts: 9
Joined: Sat Sep 30, 2017 9:53 pm

Re: android sotfkeys block getDesktopDimensions() function

Post by crystal » Thu Jan 24, 2019 4:11 pm

if anyone else have the same problem, workaround is to set fullscreen mode
love.setFullscreen(true)
and then grab your width and height from love.resize(w,h) callback

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests