Changed keyboard callbacks to pass key aswell as scancode

This commit is contained in:
rxi
2016-09-24 17:02:09 +01:00
parent d03e297a9a
commit bafcc12c95
2 changed files with 144 additions and 5 deletions

View File

@@ -77,9 +77,9 @@ int main(void) {
/* Keyboard events */
"for _, e in ipairs(love.keyboard.poll()) do\n"
"if e.type == 'down' then\n"
"if love.keypressed then love.keypressed(e.code) end\n"
"if love.keypressed then love.keypressed(e.key, e.code) end\n"
"else\n"
"if love.keyreleased then love.keyreleased(e.code) end\n"
"if love.keyreleased then love.keyreleased(e.key, e.code) end\n"
"end\n"
"end\n"
/* Update */