diff --git a/src/Escape.cpp b/src/Escape.cpp index 0d7c96ed..f1befd4f 100644 --- a/src/Escape.cpp +++ b/src/Escape.cpp @@ -10,7 +10,7 @@ int Call_Escape() { RECT rc = {0, 128, 208, 144}; - while (Flip_SystemTask()) + while (1) { //Get pressed keys GetTrg(); @@ -35,9 +35,14 @@ int Call_Escape() CortBox(&grcFull, 0x000000); PutBitmap3(&grcFull, (WINDOW_WIDTH - 208) / 2, (WINDOW_HEIGHT - 16) / 2, &rc, 26); PutFramePerSecound(); + + if (!Flip_SystemTask()) + { + //Quit if window is closed + gKeyTrg = 0; + return 0; + } } - //Quit if window is closed - gKeyTrg = 0; return 0; }