Reload the savedata request if it changes.

This happens in "Where Is My Heart?", and if it's ignored the save is
created with the wrong name and cannot be loaded properly later.
This commit is contained in:
Unknown W. Brackets committed 2013-06-23 22:30:23 -07:00
1 parent 8f0d3c55fb
commit 9032fc274f
1 file changed
+10
+10
View File
@@ -528,6 +528,16 @@ int PSPSaveDialog::Update()
return 0;
}
// The struct may have been updated by the game. This happens in "Where Is My Heart?"
// Check if it has changed, reload it.
// TODO: Cut down on preloading? This rebuilds the list from scratch.
int size = Memory::Read_U32(requestAddr);
if (memcmp(Memory::GetPointer(requestAddr), &request, size) != 0) {
memset(&request, 0, sizeof(request));
Memory::Memcpy(&request, requestAddr, size);
param.SetPspParam(&request);
}
buttons = __CtrlPeekButtons();
UpdateFade();