From d89221b15ea84e1223da754e9463a0385ff96790 Mon Sep 17 00:00:00 2001 From: staphen Date: Mon, 17 May 2021 22:56:58 -0400 Subject: [PATCH] Close Cathedral Map when B button is pressed on the controller. --- Source/controls/game_controls.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/controls/game_controls.cpp b/Source/controls/game_controls.cpp index eb8c87fa0..ab93ea002 100644 --- a/Source/controls/game_controls.cpp +++ b/Source/controls/game_controls.cpp @@ -9,6 +9,7 @@ #include "controls/menu_controls.h" #include "controls/modifier_hints.h" #include "controls/plrctrls.h" +#include "doom.h" #include "gmenu.h" #include "options.h" #include "stores.h" @@ -246,6 +247,8 @@ bool GetGameAction(const SDL_Event &event, ControllerButtonEvent ctrlEvent, Game return true; if (IsControllerButtonPressed(ControllerButton_BUTTON_BACK)) *action = GameActionSendKey { DVL_VK_F7, ctrlEvent.up }; + else if (DoomFlag) + *action = GameActionSendKey { DVL_VK_ESCAPE, ctrlEvent.up }; else if (invflag) *action = GameAction(GameActionType_TOGGLE_INVENTORY); else if (sbookflag)