diff --git a/src/port/mods/PortEnhancements.c b/src/port/mods/PortEnhancements.c index 641ad55f..14431076 100644 --- a/src/port/mods/PortEnhancements.c +++ b/src/port/mods/PortEnhancements.c @@ -165,6 +165,14 @@ void OnGameUpdatePost(IEvent* event) { } void OnPlayUpdateEvent(IEvent* event){ + bool debugPaused = CVarGetInteger("gDebugPause", 0); + if (CVarGetInteger("gLToDebugPause", 0)){ + if (gControllerPress[0].button & L_TRIG) { + CVarSetInteger("gDebugPause", !debugPaused); + } + } else { + CVarSetInteger("gDebugPause", 0); //Unpause if we disable the shortcut + } event->cancelled = CVarGetInteger("gDebugPause", 0); } diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index 71c294be..63eb520a 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -718,9 +718,8 @@ void DrawDebugMenu() { .tooltip = "Jump to credits at the main menu" }); - if (gGameState == GSTATE_PLAY){ - UIWidgets::CVarCheckbox("Debug Pause", "gDebugPause"); - } + UIWidgets::CVarCheckbox("Press L to Debug Pause", "gLToDebugPause"); + if (CVarGetInteger(StringHelper::Sprintf("gCheckpoint.%d.Set", gCurrentLevel).c_str(), 0)) { if (UIWidgets::Button("Clear Checkpoint")) {