diff --git a/src/modules/event/wrap_Event.lua b/src/modules/event/wrap_Event.lua index 22828407a..f370aa283 100644 --- a/src/modules/event/wrap_Event.lua +++ b/src/modules/event/wrap_Event.lua @@ -93,5 +93,11 @@ function event.removeListener(func) return success end +function event.clearListeners() + for k in pairs(listeners) do + listeners[k] = nil + end +end + -- DO NOT REMOVE THE NEXT LINE. It is used to load this file as a C++ string. --)luastring"--" diff --git a/src/scripts/boot.lua b/src/scripts/boot.lua index 0ee0c5a4d..db99fefb2 100644 --- a/src/scripts/boot.lua +++ b/src/scripts/boot.lua @@ -591,6 +591,7 @@ function love.errhand(msg) v:setVibration() end end + love.event.clearListeners() if love.audio then love.audio.stop() end love.graphics.reset() local font = love.graphics.setNewFont(math.floor(love.window.toPixels(14))) @@ -635,7 +636,7 @@ function love.errhand(msg) return elseif e == "keypressed" and a == "escape" then return - elseif e == "touchreleased" then + elseif e == "touchpressed" then local name = love.window.getTitle() if #name == 0 or name == "Untitled" then name = "Game" end local buttons = {"OK", "Cancel"} diff --git a/src/scripts/boot.lua.h b/src/scripts/boot.lua.h index 1048d6fbd..abc0d8f5e 100644 --- a/src/scripts/boot.lua.h +++ b/src/scripts/boot.lua.h @@ -1076,6 +1076,8 @@ const unsigned char boot_lua[] = 0x29, 0x0a, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x0a, + 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x28, 0x29, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2e, 0x73, 0x74, 0x6f, 0x70, 0x28, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a, @@ -1156,7 +1158,7 @@ const unsigned char boot_lua[] = 0x20, 0x22, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x0a, 0x09, 0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x65, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x74, 0x6f, - 0x75, 0x63, 0x68, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, + 0x75, 0x63, 0x68, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x67, 0x65, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x28, 0x29, 0x0a,