From 4692351607639fbf010c6519f3de229279737eff Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 3 Apr 2016 13:58:57 +0900 Subject: [PATCH] Terminate flag shouldn't get cleared --- src/sys/nact_input.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sys/nact_input.cpp b/src/sys/nact_input.cpp index b48bf66..95d6f7b 100644 --- a/src/sys/nact_input.cpp +++ b/src/sys/nact_input.cpp @@ -22,7 +22,8 @@ uint8 NACT::get_key() { uint8 val = 0; - terminate = pump_events(); + if (pump_events()) + terminate = true; // キーボード&マウス const Uint8* key = SDL_GetKeyboardState(NULL); @@ -60,7 +61,8 @@ uint8 NACT::get_key() void NACT::get_cursor(int* x, int* y) { - terminate = pump_events(); + if (pump_events()) + terminate = true; SDL_GetMouseState(x, y); }