Skip to content

Commit

Permalink
move joysticks callbacks out of love.load check
Browse files Browse the repository at this point in the history
  • Loading branch information
christphe committed Dec 16, 2024
1 parent 1c9784f commit 2e5980e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions source/modules/love/scripts/callbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e5980e

Please sign in to comment.