Correctly shutdown dialogs on game reset.

This commit is contained in:
Unknown W. Brackets 2013-05-31 01:07:37 -07:00
parent aaddde2f62
commit 7d17ed8a8e
7 changed files with 11 additions and 11 deletions

View File

@ -58,7 +58,7 @@ void PSPDialog::DisplayMessage(std::string text)
PPGeDrawTextWrapped(text.c_str(), 40, 50, 420, PPGE_ALIGN_LEFT, 0.55f, CalcFadedColor(0xFFFFFFFF));
}
int PSPDialog::Shutdown()
int PSPDialog::Shutdown(bool force)
{
status = SCE_UTILITY_STATUS_SHUTDOWN;
return 0;

View File

@ -52,7 +52,7 @@ public:
virtual ~PSPDialog();
virtual int Update();
virtual int Shutdown();
virtual int Shutdown(bool force = false);
virtual void DoState(PointerWrap &p);
enum DialogStatus

View File

@ -239,7 +239,7 @@ int PSPMsgDialog::Abort()
return PSPDialog::Shutdown();
}
int PSPMsgDialog::Shutdown()
int PSPMsgDialog::Shutdown(bool force)
{
return PSPDialog::Shutdown();
}

View File

@ -59,7 +59,7 @@ public:
virtual int Init(unsigned int paramAddr);
virtual int Update();
virtual int Shutdown();
virtual int Shutdown(bool force = false);
virtual void DoState(PointerWrap &p);
int Abort();

View File

@ -860,9 +860,9 @@ int PSPSaveDialog::Update()
return 0;
}
int PSPSaveDialog::Shutdown()
int PSPSaveDialog::Shutdown(bool force)
{
if (status != SCE_UTILITY_STATUS_FINISHED)
if (status != SCE_UTILITY_STATUS_FINISHED && !force)
return SCE_ERROR_UTILITY_INVALID_STATUS;
PSPDialog::Shutdown();

View File

@ -69,7 +69,7 @@ public:
virtual int Init(int paramAddr);
virtual int Update();
virtual int Shutdown();
virtual int Shutdown(bool force = false);
virtual void DoState(PointerWrap &p);
private :

View File

@ -77,10 +77,10 @@ void __UtilityDoState(PointerWrap &p)
void __UtilityShutdown()
{
saveDialog.Shutdown();
msgDialog.Shutdown();
oskDialog.Shutdown();
netDialog.Shutdown();
saveDialog.Shutdown(true);
msgDialog.Shutdown(true);
oskDialog.Shutdown(true);
netDialog.Shutdown(true);
}
int __UtilityGetStatus()