about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-12-03 12:11:17 -0800
committerKartik K. Agaram <vc@akkartik.com>2023-12-03 12:11:17 -0800
commit99930149044300dc8f92c8a07e33ea1669e9d37d (patch)
tree104346e9c3ae7c5cb891d110772cf3fed69de878
parent0d3db19c854cc70b82e9935c7ae8f6ad6986d89f (diff)
downloadtext.love-99930149044300dc8f92c8a07e33ea1669e9d37d.tar.gz
bugfix: version check
-rw-r--r--Manual_tests.md2
-rw-r--r--app.lua1
-rw-r--r--main.lua5
3 files changed, 6 insertions, 2 deletions
diff --git a/Manual_tests.md b/Manual_tests.md
index fcc3a29..4aa3897 100644
--- a/Manual_tests.md
+++ b/Manual_tests.md
@@ -17,6 +17,8 @@ Initializing settings:
   - start out editing source, move window, press ctrl+e twice; window is editing source in same position+dimensions
   - no log file; switching to source works
 
+  - run with an unsupported version. Error message pops up and waits for a key. The app attempts to continue, and doesn't receive the key.
+
 Code loading:
 * run love with directory; text editor runs
 * run love with zip file; text editor runs
diff --git a/app.lua b/app.lua
index 35350d4..4142380 100644
--- a/app.lua
+++ b/app.lua
@@ -107,6 +107,7 @@ function App.run_tests_and_initialize()
   App.disable_tests()
   App.initialize_globals()
   App.initialize(love.arg.parseGameArguments(arg), arg)
+  App.version_check()
 end
 
 function App.run_tests()
diff --git a/main.lua b/main.lua
index 4570800..e68d7cb 100644
--- a/main.lua
+++ b/main.lua
@@ -254,13 +254,14 @@ function App.textinput(t)
 end
 
 function App.keyreleased(key, scancode)
-  if Current_app == 'error' then return end
   -- ignore events for some time after window in focus (mostly alt-tab)
   if Current_time < Last_focus_time + 0.01 then
     return
   end
   --
-  if Current_app == 'run' then
+  if Current_app == 'error' then
+    Current_app = 'run'
+  elseif Current_app == 'run' then
     if run.key_release then run.key_release(key, scancode) end
   elseif Current_app == 'source' then
     if source.key_release then source.key_release(key, scancode) end