Debug close update

This commit is contained in:
Baoulettes 2022-05-20 19:32:41 +02:00 committed by louist103
parent ffc22fe8c4
commit 6478df046a

View File

@ -640,9 +640,13 @@ void KaleidoScope_DrawDebugEditor(GlobalContext* globalCtx) {
// Handles exiting the inventory editor with the L button
// The editor is opened with `debugState` set to 1, and becomes closable after a frame once `debugState` is set to 2
s16 Debug_BTN = BTN_L;
if (CVar_GetS32("gNGCKaleidoSwitcher", 0) != 1) {
Debug_BTN = BTN_Z;
}
if (pauseCtx->debugState == 1) {
pauseCtx->debugState = 2;
} else if ((pauseCtx->debugState == 2) && CHECK_BTN_ALL(input->press.button, BTN_L)) {
} else if ((pauseCtx->debugState == 2) && CHECK_BTN_ALL(input->press.button, Debug_BTN)) {
pauseCtx->debugState = 0;
}