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:
parent
d16dd9c6ce
commit
d87331e5ae
27
main.lua
27
main.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue