mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Avoid reloading save info on move/resize.
We don't really need to do this all the time, we can just do it on exit of the entire screen. Also fixes a crash on close. Fixes #8619.
This commit is contained in:
parent
ee27d838dd
commit
50083a3c0c
2 changed files with 8 additions and 6 deletions
|
@ -273,11 +273,6 @@ SavedataBrowser::SavedataBrowser(std::string path, UI::LayoutParams *layoutParam
|
|||
Refresh();
|
||||
}
|
||||
|
||||
SavedataBrowser::~SavedataBrowser() {
|
||||
g_gameInfoCache->PurgeType(FILETYPE_PPSSPP_SAVESTATE);
|
||||
g_gameInfoCache->PurgeType(FILETYPE_PSP_SAVEDATA_DIRECTORY);
|
||||
}
|
||||
|
||||
void SavedataBrowser::Refresh() {
|
||||
using namespace UI;
|
||||
|
||||
|
@ -338,6 +333,13 @@ UI::EventReturn SavedataBrowser::SavedataButtonClick(UI::EventParams &e) {
|
|||
SavedataScreen::SavedataScreen(std::string gamePath) : UIDialogScreenWithGameBackground(gamePath) {
|
||||
}
|
||||
|
||||
SavedataScreen::~SavedataScreen() {
|
||||
if (g_gameInfoCache) {
|
||||
g_gameInfoCache->PurgeType(FILETYPE_PPSSPP_SAVESTATE);
|
||||
g_gameInfoCache->PurgeType(FILETYPE_PSP_SAVEDATA_DIRECTORY);
|
||||
}
|
||||
}
|
||||
|
||||
void SavedataScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
I18NCategory *sa = GetI18NCategory("Savedata");
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
class SavedataBrowser : public UI::LinearLayout {
|
||||
public:
|
||||
SavedataBrowser(std::string path, UI::LayoutParams *layoutParams = 0);
|
||||
~SavedataBrowser();
|
||||
|
||||
UI::Event OnChoice;
|
||||
|
||||
|
@ -45,6 +44,7 @@ class SavedataScreen : public UIDialogScreenWithGameBackground {
|
|||
public:
|
||||
// gamePath can be empty, in that case this screen will show all savedata in the save directory.
|
||||
SavedataScreen(std::string gamePath);
|
||||
~SavedataScreen();
|
||||
|
||||
void dialogFinished(const Screen *dialog, DialogResult result) override;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue