diff options
Diffstat (limited to 'settings.lua')
-rw-r--r-- | settings.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/settings.lua b/settings.lua index 920abdf..93432a0 100644 --- a/settings.lua +++ b/settings.lua @@ -12,10 +12,14 @@ function Settings.load() local getSettings = love.filesystem.load("settings") for _,set in pairs(getSettings()) do local isJoystick = set[7] + local joystick if isJoystick then + joystick = love.joystick.getJoysticks()[1] -- Add first free joystick from joysticks list end - Controller.registerSet(set[1], set[2], set[3], set[4], set[5], set[6], joystick) + if not isJoystick or joystick then + Controller.registerSet(set[1], set[2], set[3], set[4], set[5], set[6], joystick) + end end end end |