about summary refs log tree commit diff stats
path: root/app.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-11-18 15:06:48 -0800
committerKartik K. Agaram <vc@akkartik.com>2023-11-18 15:06:48 -0800
commit096f9bf720c7fb717e65348f4f88508c3daaf14e (patch)
treea709820436ced818e6fd765f634e94970f9eae0d /app.lua
parentde66b015bcfbf4a995b25cc74c5f95d2362760a8 (diff)
parent48c05aa77a6a06329f4764ab511e39611262c23f (diff)
downloadview.love-096f9bf720c7fb717e65348f4f88508c3daaf14e.tar.gz
Merge lines.love
Diffstat (limited to 'app.lua')
-rw-r--r--app.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/app.lua b/app.lua
index cff3483..35350d4 100644
--- a/app.lua
+++ b/app.lua
@@ -406,6 +406,7 @@ local Keys_down = {}
 -- can't run any tests after this
 function App.disable_tests()
   -- have LÖVE delegate all handlers to App if they exist
+  -- make sure to late-bind handlers like LÖVE's defaults do
   for name in pairs(love.handlers) do
     if App[name] then
       -- love.keyboard.isDown doesn't work on Android, so emulate it using
@@ -421,7 +422,7 @@ function App.disable_tests()
                                 return App.keyreleased(key, scancode)
                               end
       else
-        love.handlers[name] = App[name]
+        love.handlers[name] = function(...) App[name](...) end
       end
     end
   end