Page 1 of 1

android sotfkeys block getDesktopDimensions() function

Posted: Wed Jan 16, 2019 2:41 pm
by crystal
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

Re: android sotfkeys block getDesktopDimensions() function

Posted: Thu Jan 24, 2019 4:11 pm
by crystal
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