From 9032fc274fac834aeda01bead2b5d3efb545a96f Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 23 Jun 2013 22:30:23 -0700 Subject: [PATCH] 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. --- Core/Dialog/PSPSaveDialog.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index fd3fe9a8e0..81e49e9df3 100755 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -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();