fix error when unsetting the joystick while _activeDevice is 'joy'

This commit is contained in:
Andrew Minnich
2020-12-12 16:56:01 -05:00
parent 4d44f220f9
commit e5ca693641
2 changed files with 9 additions and 0 deletions

View File

@@ -55,6 +55,9 @@ function love.update(dt)
end
function love.keypressed(key)
if key == 'space' then
player.config.joystick = nil
end
if key == 'escape' then
love.event.quit()
end