Don't restart twice on F5;

This commit is contained in:
bjorn 2019-07-29 11:52:06 -07:00
parent 4b9e6849c8
commit 947c468eb1
1 changed files with 4 additions and 0 deletions

View File

@ -127,6 +127,10 @@ static int nextEvent(lua_State* L) {
}
static void hotkeyHandler(KeyCode key, ButtonAction action) {
if (action != BUTTON_PRESSED) {
return;
}
if (key == KEY_ESCAPE) {
lovrEventPush((Event) { .type = EVENT_QUIT, .data.quit.restart = false, .data.quit.exitCode = 0 });
} else if (key == KEY_F5) {