From 00491bb33b03cce0a82782beb6fdd52406c7d0ab Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 27 Sep 2014 00:13:11 -0700 Subject: [PATCH] Process msgdialog abort on Update(). Matches tests. --- Core/Dialog/PSPMsgDialog.cpp | 5 +++-- Core/Dialog/PSPMsgDialog.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/Dialog/PSPMsgDialog.cpp b/Core/Dialog/PSPMsgDialog.cpp index a31706ab0b..c2322b9e84 100755 --- a/Core/Dialog/PSPMsgDialog.cpp +++ b/Core/Dialog/PSPMsgDialog.cpp @@ -218,7 +218,7 @@ int PSPMsgDialog::Update(int animSpeed) { return SCE_ERROR_UTILITY_INVALID_STATUS; } - if ((flag & DS_ERROR)) { + if (flag & (DS_ERROR | DS_ABORT)) { ChangeStatus(SCE_UTILITY_STATUS_FINISHED, 0); } else { UpdateButtons(); @@ -290,7 +290,8 @@ int PSPMsgDialog::Abort() { if (GetStatus() != SCE_UTILITY_STATUS_RUNNING) { return SCE_ERROR_UTILITY_INVALID_STATUS; } else { - ChangeStatus(SCE_UTILITY_STATUS_FINISHED, 0); + // Status is not actually changed until Update(). + flag |= DS_ABORT; return 0; } } diff --git a/Core/Dialog/PSPMsgDialog.h b/Core/Dialog/PSPMsgDialog.h index 43df9f477a..a2f30a797d 100644 --- a/Core/Dialog/PSPMsgDialog.h +++ b/Core/Dialog/PSPMsgDialog.h @@ -85,7 +85,8 @@ private : DS_VALIDBUTTON = 0x20, DS_CANCELBUTTON = 0x40, DS_NOSOUND = 0x80, - DS_ERROR = 0x100 + DS_ERROR = 0x100, + DS_ABORT = 0x200, }; u32 flag;