diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-03-18 23:50:30 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-03-18 23:50:30 -0700 |
commit | 30e75991ce3430550d7565c8141fc8ed68c67290 (patch) | |
tree | 3bb0b3c3a8ff64da4f41a231b4a55325a101068c | |
parent | 1b90ffca9ef5d3c1b47808841bcf20c55a73cb4d (diff) | |
download | lines.love-30e75991ce3430550d7565c8141fc8ed68c67290.tar.gz |
get typed in keystrokes to show on screen on iPad
Many thanks to Myte for helping test this!
-rw-r--r-- | run.lua | 7 | ||||
-rw-r--r-- | source.lua | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/run.lua b/run.lua index 347eea9..28516f6 100644 --- a/run.lua +++ b/run.lua @@ -75,6 +75,13 @@ function run.initialize_default_settings() end function run.initialize_window_geometry(em_width) + 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() + return + end -- maximize window App.screen.resize(0, 0) -- maximize App.screen.width, App.screen.height, App.screen.flags = App.screen.size() diff --git a/source.lua b/source.lua index 0fdd7f6..f4f6600 100644 --- a/source.lua +++ b/source.lua @@ -128,6 +128,13 @@ function source.load_settings() end function source.resize_window_from_settings(settings) + 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() + return + end -- maximize window to determine maximum allowable dimensions App.screen.resize(0, 0) -- maximize Display_width, Display_height, App.screen.flags = App.screen.size() @@ -158,6 +165,13 @@ function source.initialize_default_settings() end function source.initialize_window_geometry(em_width) + 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() + return + end -- maximize window App.screen.resize(0, 0) -- maximize Display_width, Display_height, App.screen.flags = App.screen.size() |