debug menu: object events now frozen while open

This commit is contained in:
TheXaman 2022-09-14 13:43:26 +02:00
parent 2c20514035
commit 1e03b4747f
3 changed files with 4 additions and 0 deletions

View file

@ -709,6 +709,7 @@ static void Debug_DestroyMenu_Full(u8 taskId)
ClearStdWindowAndFrame(gTasks[taskId].data[1], TRUE);
RemoveWindow(gTasks[taskId].data[1]);
DestroyTask(taskId);
UnfreezeObjectEvents();
}
static void DebugAction_Cancel(u8 taskId)
{
@ -725,6 +726,7 @@ static void DebugAction_DestroyExtraWindow(u8 taskId)
DestroyTask(taskId);
ScriptContext_Enable();
UnfreezeObjectEvents();
}

View file

@ -201,6 +201,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
if (input->input_field_1_2)
{
PlaySE(SE_WIN_OPEN);
FreezeObjectEvents();
Debug_ShowMainMenu();
return TRUE;
}

View file

@ -761,6 +761,7 @@ static bool8 StartMenuDebugCallback(void)
HideStartMenuDebug(); // Hide start menu without enabling movement
#if DEBUG_SYSTEM_ENABLE == TRUE
FreezeObjectEvents();
Debug_ShowMainMenu();
#endif