From 19597e7619babdf9a35efd61c9a87bdabd173569 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 6 Dec 2023 21:32:10 -0800 Subject: redo version checks yet again I'm starting to feel better after replacing 1 line with 20 and 2 new bits of global state. I'm now handling two scenarios more explicitly: * If I change Current_app within key_press, the corresponding text_input and key_release events go to the new app. If it's an editor it might insert the key, which is undesirable. Putting such handlers in key_release now feels overly clever, particularly since it took me forever to realize why I was getting stuck in an infinite loop. * Both 'run' and 'source' can hit the version check, so we need to be able to transition from the 'error' app to either. Which necessitates yet another global bit of state: Next_app. --- app.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'app.lua') diff --git a/app.lua b/app.lua index 32c6f00..271fdc3 100644 --- a/app.lua +++ b/app.lua @@ -12,7 +12,6 @@ function love.run() App.snapshot_love() -- Tests always run at the start. App.run_tests_and_initialize() - App.love_version_check() -- hack: we want to run this just the first time and not every time we bounce between 'run' and 'source' --? print('==') love.timer.step() -- cgit 1.4.1-2-gfad0