From 299293ca99ea4b2d03527d2f261eb403d5242ba6 Mon Sep 17 00:00:00 2001 From: thecozies <79979276+thecozies@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:13:27 -0500 Subject: [PATCH] map cont back button to kb escape --- src/ui/ui_renderer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/ui_renderer.cpp b/src/ui/ui_renderer.cpp index 6685bfd..19a2ea6 100644 --- a/src/ui/ui_renderer.cpp +++ b/src/ui/ui_renderer.cpp @@ -1059,6 +1059,9 @@ int cont_button_to_key(SDL_ControllerButtonEvent& button) { return SDLK_RIGHT; case SDL_GameControllerButton::SDL_CONTROLLER_BUTTON_A: return SDLK_RETURN; + // Allows closing the menu + case SDL_GameControllerButton::SDL_CONTROLLER_BUTTON_BACK: + return SDLK_ESCAPE; } return 0; }