fix previous merge

get typed in keystrokes to show on screen on iPad

Many thanks to Myte for helping test this!
This commit is contained in:
Kartik K. Agaram 2023-03-19 00:22:36 -07:00
parent d16dd9c6ce
commit d87331e5ae
1 changed files with 17 additions and 10 deletions

View File

@ -82,16 +82,23 @@ function load_settings()
else
local font_height = 20
love.graphics.setFont(love.graphics.newFont(font_height))
-- maximize window
App.screen.resize(0, 0) -- maximize
App.screen.width, App.screen.height, App.screen.flags = App.screen.size()
-- shrink height slightly to account for window decoration
App.screen.height = App.screen.height-100
App.screen.width = 40*App.width(App.newText(love.graphics.getFont(), 'm'))
App.screen.flags.resizable = true
App.screen.flags.minwidth = math.min(App.screen.width, 200)
App.screen.flags.minheight = math.min(App.screen.height, 200)
App.screen.resize(App.screen.width, App.screen.height, App.screen.flags)
local os = love.system.getOS()
if os == 'Android' or os == 'iOS' then
-- maximizing on iOS breaks text rendering: https://github.com/deltadaedalus/vudu/issues/7
-- no point second-guessing window dimensions on mobile
App.screen.width, App.screen.height, App.screen.flags = App.screen.size()
else
-- maximize window
App.screen.resize(0, 0) -- maximize
App.screen.width, App.screen.height, App.screen.flags = App.screen.size()
-- shrink height slightly to account for window decoration
App.screen.height = App.screen.height-100
App.screen.width = 40*App.width(App.newText(love.graphics.getFont(), 'm'))
App.screen.flags.resizable = true
App.screen.flags.minwidth = math.min(App.screen.width, 200)
App.screen.flags.minheight = math.min(App.screen.height, 200)
App.screen.resize(App.screen.width, App.screen.height, App.screen.flags)
end
if on.load_settings then on.load_settings() end
end
end