From 76ac4771081d42a71334a1f656d8d3c83760e9b2 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 6 Feb 2019 12:16:50 +0000 Subject: [PATCH] Made Call_Escape more accurate The ASM indicates it's a `while (1)`, and there's no break. --- src/Escape.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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; }