conf.lua:
Code: Select all
function love.conf(c)
c.window.usedpiscale = false
c.window.fullscreen = false or true -- change to test both cases
c.window.fullscreenmode = "desktop" -- "exclusive" doesn't make a difference
end
Code: Select all
local lg, lw = love.graphics, love.window
local c = {window = {}}
love.conf(c)
if c.window.usedpiscale == false and lg.getNativeDPIScale then
lg.setFont(lg.newFont(14*lg.getNativeDPIScale()))
end
lg.setLineStyle("rough")
lg.setBackgroundColor(0, 0, 1)
function love.draw()
local x, y, w, h = lw.getSafeArea and lw.getSafeArea()
local ww, wh = lg.getDimensions()
-- Crossed box
lg.line(0.5, 0.5, ww-0.5, wh-0.5)
lg.line(0.5, wh-0.5, ww-0.5, 0.5)
lg.rectangle("line", 0.5, 0.5, ww-1, wh-1)
lg.print(string.format("%d.%d %s %s %s %s %d %d", love.getVersion(), x, y, w, h, ww, wh), 0, 80)
end
function love.keypressed(k) return k == "escape" and love.event.quit() end
- In non-fullscreen, the notifications bar completely hides a part of the image.
- In fullscreen, when the buttons hide, there is a black bar where the button bar would be.
Edit: 11.1 worked fine, in the sense that the app was in fullscreen by default and the area where the buttons were hidden was drawable.