shithub: candycrisis

Download patch

ref: b4805f6e847e719e08e5f75e09b4f6010f7b43b6
parent: 3328441c9a52aa745de12517f6f5e82f5bf9bc37
author: Iliyas Jorio <[email protected]>
date: Wed Feb 2 15:44:31 EST 2022

Fix escape key behavior in pause/continue menus

--- a/src/pause.cpp
+++ b/src/pause.cpp
@@ -39,8 +39,6 @@
 using std::min;
 using std::max;
 
-const char kEscapeKey = 0x1B;
-
 struct FRGBColor
 {
 	float red, green, blue;
@@ -760,7 +758,7 @@
 		return true;
 	}
 	
-	if( inKey == kEscapeKey )
+	if( inSDLKey == SDLK_ESCAPE )
 	{
 		*item = kContinue;
 		return true;
@@ -911,7 +909,7 @@
 	SDLU_GetMouse( &p );
 	
 	trigger = SDLU_Button();
-	if( inKey == kEscapeKey )
+	if( inSDLKey == SDLK_ESCAPE )
 	{
 		*item = kResume;
 		trigger = true;