macOS: Allow opening game folder.

This commit is contained in:
Unknown W. Brackets committed 2021-10-19 10:01:27 -07:00
1 parent 450b59809b
commit 08a55d19d5
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -190,12 +190,15 @@ void System_AskForPermission(SystemPermission permission) {}
PermissionStatus System_GetPermissionStatus(SystemPermission permission) { return PERMISSION_STATUS_GRANTED; }
void OpenDirectory(const char *path) {
#if defined(_WIN32)
#if PPSSPP_PLATFORM(WINDOWS)
PIDLIST_ABSOLUTE pidl = ILCreateFromPath(ConvertUTF8ToWString(ReplaceAll(path, "/", "\\")).c_str());
if (pidl) {
SHOpenFolderAndSelectItems(pidl, 0, NULL, 0);
ILFree(pidl);
}
#elif PPSSPP_PLATFORM(MAC)
std::string command = std::string("open ") + path;
system(command.c_str());
#endif
}
+1 -1
View File
@@ -168,7 +168,7 @@ void GameScreen::CreateViews() {
if (isRecentGame(gamePath_)) {
rightColumnItems->Add(AddOtherChoice(new Choice(ga->T("Remove From Recent"))))->OnClick.Handle(this, &GameScreen::OnRemoveFromRecent);
}
#if (defined(USING_QT_UI) || PPSSPP_PLATFORM(WINDOWS)) && !PPSSPP_PLATFORM(UWP)
#if (defined(USING_QT_UI) || PPSSPP_PLATFORM(WINDOWS) || PPSSPP_PLATFORM(MAC)) && !PPSSPP_PLATFORM(UWP)
rightColumnItems->Add(AddOtherChoice(new Choice(ga->T("Show In Folder"))))->OnClick.Handle(this, &GameScreen::OnShowInFolder);
#endif
if (g_Config.bEnableCheats) {