From 2e5980e44199b69caee617f8f05dad0fa2e10cf3 Mon Sep 17 00:00:00 2001 From: christphe Date: Mon, 16 Dec 2024 20:49:25 +0100 Subject: [PATCH] move joysticks callbacks out of love.load check --- source/modules/love/scripts/callbacks.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/modules/love/scripts/callbacks.lua b/source/modules/love/scripts/callbacks.lua index f70c12c0..958bc180 100644 --- a/source/modules/love/scripts/callbacks.lua +++ b/source/modules/love/scripts/callbacks.lua @@ -225,11 +225,12 @@ end function love.run() if love.load then love.load(love.parsedGameArguments, love.rawGameArguments) - -- https://love2d.org/wiki/love.joystickadded - -- This callback is also triggered after love.load for every Joystick which was already connected when the game started up. - for _, j in ipairs(love.joystick.getJoysticks()) do - love.handlers.joystickadded(j) - end + end + + -- https://love2d.org/wiki/love.joystickadded + -- This callback is also triggered after love.load for every Joystick which was already connected when the game started up. + for _, j in ipairs(love.joystick.getJoysticks()) do + love.handlers.joystickadded(j) end if love.timer then