shithub: cstory

Download patch

ref: 76ac4771081d42a71334a1f656d8d3c83760e9b2
parent: abf51970df1d3459104f7c993ef92e1e4680b3e4
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Feb 6 07:16:50 EST 2019

Made Call_Escape more accurate

The ASM indicates it's a `while (1)`, and there's no break.

--- a/src/Escape.cpp
+++ b/src/Escape.cpp
@@ -10,7 +10,7 @@
 {
 	RECT rc = {0, 128, 208, 144};
 	
-	while (Flip_SystemTask())
+	while (1)
 	{
 		//Get pressed keys
 		GetTrg();
@@ -35,9 +35,14 @@
 		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;
 }