mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Savedata: Eat cycles in savedata shutdown start.
This commit is contained in:
parent
5d4d8ab418
commit
2b9b157151
2 changed files with 5 additions and 14 deletions
|
@ -96,7 +96,7 @@ void PSPDialog::ChangeStatus(DialogStatus newStatus, int delayUs) {
|
|||
}
|
||||
|
||||
void PSPDialog::FinishVolatile() {
|
||||
if (KernelVolatileMemUnlock(0) == 0) {
|
||||
if (volatileLocked_ && KernelVolatileMemUnlock(0) == 0) {
|
||||
volatileLocked_ = false;
|
||||
// Simulate modifications to volatile memory.
|
||||
Memory::Memset(PSP_GetVolatileMemoryStart(), 0, PSP_GetVolatileMemoryEnd() - PSP_GetVolatileMemoryStart());
|
||||
|
|
|
@ -145,9 +145,6 @@ static int volatileUnlockEvent = -1;
|
|||
|
||||
static void ActivateDialog(UtilityDialogType type) {
|
||||
if (!currentDialogActive) {
|
||||
// TODO: Lock volatile RAM (see https://github.com/hrydgard/ppsspp/issues/8288)
|
||||
// We don't have a virtual dialog thread unlike JPSCP. Not sure if it's OK to
|
||||
// just do it on the current thread - it does seem dangerous to assume so...
|
||||
currentDialogType = type;
|
||||
currentDialogActive = true;
|
||||
}
|
||||
|
@ -155,7 +152,6 @@ static void ActivateDialog(UtilityDialogType type) {
|
|||
|
||||
static void DeactivateDialog() {
|
||||
if (currentDialogActive) {
|
||||
// TODO: Unlock and zero volatile RAM.
|
||||
currentDialogActive = false;
|
||||
}
|
||||
}
|
||||
|
@ -249,19 +245,14 @@ static int sceUtilitySavedataInitStart(u32 paramAddr)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int sceUtilitySavedataShutdownStart()
|
||||
{
|
||||
static int sceUtilitySavedataShutdownStart() {
|
||||
if (currentDialogType != UTILITY_DIALOG_SAVEDATA)
|
||||
{
|
||||
WARN_LOG(SCEUTILITY, "sceUtilitySavedataShutdownStart(): wrong dialog type");
|
||||
return SCE_ERROR_UTILITY_WRONG_TYPE;
|
||||
}
|
||||
return hleLogWarning(SCEUTILITY, SCE_ERROR_UTILITY_WRONG_TYPE, "wrong dialog type");
|
||||
|
||||
DeactivateDialog();
|
||||
DeactivateDialog();
|
||||
int ret = saveDialog.Shutdown();
|
||||
DEBUG_LOG(SCEUTILITY,"%08x=sceUtilitySavedataShutdownStart()",ret);
|
||||
return ret;
|
||||
hleEatCycles(90000);
|
||||
return hleLogSuccessX(SCEUTILITY, ret);
|
||||
}
|
||||
|
||||
static int sceUtilitySavedataGetStatus()
|
||||
|
|
Loading…
Add table
Reference in a new issue