mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-06 06:13:36 +00:00
Don't restart twice on F5;
This commit is contained in:
parent
4b9e6849c8
commit
947c468eb1
|
@ -127,6 +127,10 @@ static int nextEvent(lua_State* L) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hotkeyHandler(KeyCode key, ButtonAction action) {
|
static void hotkeyHandler(KeyCode key, ButtonAction action) {
|
||||||
|
if (action != BUTTON_PRESSED) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (key == KEY_ESCAPE) {
|
if (key == KEY_ESCAPE) {
|
||||||
lovrEventPush((Event) { .type = EVENT_QUIT, .data.quit.restart = false, .data.quit.exitCode = 0 });
|
lovrEventPush((Event) { .type = EVENT_QUIT, .data.quit.restart = false, .data.quit.exitCode = 0 });
|
||||||
} else if (key == KEY_F5) {
|
} else if (key == KEY_F5) {
|
||||||
|
|
Loading…
Reference in a new issue