diff --git a/Common/System/Request.h b/Common/System/Request.h index 6bd40b1fd1..2db3ddcf5a 100644 --- a/Common/System/Request.h +++ b/Common/System/Request.h @@ -105,6 +105,7 @@ inline void System_BrowseForImage(RequesterToken token, std::string_view title, enum class BrowseFileType { BOOTABLE, + SAVE_STATE, IMAGE, INI, DB, diff --git a/Core/Util/DarwinFileSystemServices.mm b/Core/Util/DarwinFileSystemServices.mm index 16e43e79a8..1cb3bf694c 100644 --- a/Core/Util/DarwinFileSystemServices.mm +++ b/Core/Util/DarwinFileSystemServices.mm @@ -238,6 +238,9 @@ void DarwinFileSystemServices::presentDirectoryPanel( case BrowseFileType::BOOTABLE: [panel setAllowedFileTypes:[NSArray arrayWithObjects:@"iso", @"cso", @"chd", @"pbp", @"elf", @"zip", @"ppdmp", @"prx", nil]]; break; + case BrowseFileType::SAVE_STATE: + [panel setAllowedFileTypes:[NSArray arrayWithObjects:@"ppst", nil]]; + break; case BrowseFileType::IMAGE: [panel setAllowedFileTypes:[NSArray arrayWithObjects:@"jpg", @"png", nil]]; break; diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index 30a40ae277..db5f7e28be 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -649,6 +649,10 @@ static void InitializeFilters(std::vector &filters, BrowseFileType filters.push_back("All supported file types (*.iso *.cso *.chd *.pbp *.elf *.prx *.zip *.ppdmp)"); filters.push_back("*.pbp *.elf *.iso *.cso *.chd *.prx *.zip *.ppdmp"); break; + case BrowseFileType::SAVE_STATE: + filters.push_back("Save state files (*.ppst)"); + filters.push_back("*.ppst"); + break; case BrowseFileType::INI: filters.push_back("Ini files"); filters.push_back("*.ini"); diff --git a/UWP/PPSSPP_UWPMain.cpp b/UWP/PPSSPP_UWPMain.cpp index 5e8a6fc3e2..d533062168 100644 --- a/UWP/PPSSPP_UWPMain.cpp +++ b/UWP/PPSSPP_UWPMain.cpp @@ -565,6 +565,9 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string case BrowseFileType::BOOTABLE: supportedExtensions = { ".cso", ".iso", ".chd", ".elf", ".pbp", ".zip", ".prx", ".bin" }; // should .bin even be here? break; + case BrowseFileType::SAVE_STATE: + supportedExtensions = { ".ppst" }; + break; case BrowseFileType::INI: supportedExtensions = { ".ini" }; break; diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index d4a5a148d8..0dc3e2f2c9 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -398,6 +398,7 @@ namespace MainWindow { static void SaveStateActionFinished(SaveState::Status status, std::string_view message, std::string_view metadata) { // Reuse the message from the pause screen. ShowMessageAfterSaveStateAction(status, message, metadata); + // This is just used to restore the mouse cursor from wait mode. PostMessage(MainWindow::GetHWND(), WM_USER_SAVESTATE_FINISH, 0, 0); } diff --git a/Windows/main.cpp b/Windows/main.cpp index 25c4cd15b3..e6fd35dd8d 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -632,6 +632,8 @@ static std::wstring MakeWindowsFilter(BrowseFileType type) { switch (type) { case BrowseFileType::BOOTABLE: return FinalizeFilter(L"All supported file types (*.iso *.cso *.chd *.pbp *.elf *.prx *.zip *.ppdmp)|*.pbp;*.elf;*.iso;*.cso;*.chd;*.prx;*.zip;*.ppdmp|PSP ROMs (*.iso *.cso *.chd *.pbp *.elf *.prx)|*.pbp;*.elf;*.iso;*.cso;*.chd;*.prx|Homebrew/Demos installers (*.zip)|*.zip|All files (*.*)|*.*||"); + case BrowseFileType::SAVE_STATE: + return FinalizeFilter(L"Save state files (*.ppst)|*.ppst|All files (*.*)|*.*||"); case BrowseFileType::INI: return FinalizeFilter(L"Ini files (*.ini)|*.ini|All files (*.*)|*.*||"); case BrowseFileType::ZIP: