1. Anders Ruud
  2. love
  3. Issues

Issues

Issue #834 invalid

love.keypressed(key) resets when using love.window.setMode inside

Felix Eklöf
created an issue

When you have a code like the follwoing:

function love.keypressed(key)
if key == "q" then
    love.window.setMode(0, 0, {fullscreen=true})
    love.window.setMode(love.graphics.getWidth(),love.graphics.getHeight(), {fullscreen=true})
end
end

The code inside the if statement should only runned once if you hold the specified key down, but if you have a code that changes resolution inside the if statement it "resets" and you can hold the key down and the code will run over and over again.

Comments (4)

  1. Log in to comment