add additional input master
authorStan_Lewry <stanley.jml@gmail.com>
Tue, 1 Oct 2024 20:04:26 +0000 (21:04 +0100)
committerStan_Lewry <stanley.jml@gmail.com>
Tue, 1 Oct 2024 20:04:26 +0000 (21:04 +0100)
2DEngine.cpp
2DEngine.h

index 2114b6c..710c9dd 100644 (file)
@@ -128,6 +128,7 @@ namespace S2DE {
                                case SDLK_LEFT: inputState->left = true; break;\r
                                case SDLK_RIGHT: inputState->right = true; break;\r
                                case SDLK_RETURN: inputState->rtrn = true; break;\r
+                               case SDLK_ESCAPE: inputState->escape = true; break;\r
                                }\r
                                break;\r
                        case SDL_KEYUP:\r
@@ -138,6 +139,7 @@ namespace S2DE {
                                case SDLK_LEFT: inputState->left = false; break;\r
                                case SDLK_RIGHT: inputState->right = false; break;\r
                                case SDLK_RETURN: inputState->rtrn = false; break;\r
+                               case SDLK_ESCAPE: inputState->escape = false; break;\r
                                }\r
                        }\r
                }\r
index c50a28e..57fe6e0 100644 (file)
@@ -37,6 +37,7 @@ namespace S2DE {
         bool up, down, left, right;\r
         bool quit;\r
         bool rtrn;\r
+        bool escape;\r
     };\r
 \r
     __declspec(dllexport) void updateInputState(InputState* inputState);\r