Improved Show in Folder:

- Not spawning cmd.exe anymore, rather using the same way Chromium does to spawn a shell window with a file focused
- Hid a nonfunctional "Show In Folder" button for UWP builds
This commit is contained in:
Silent committed 2019-05-23 19:59:08 +02:00
1 parent c748380f5d
commit bb2ba8086b
8 files changed
+38 -5

No files matched your search

+2 -5
View File
@@ -134,7 +134,7 @@ void GameScreen::CreateViews() {
if (isRecentGame(gamePath_)) {
rightColumnItems->Add(AddOtherChoice(new Choice(ga->T("Remove From Recent"))))->OnClick.Handle(this, &GameScreen::OnRemoveFromRecent);
}
#ifdef _WIN32
#if PPSSPP_PLATFORM(WINDOWS) && !PPSSPP_PLATFORM(UWP)
rightColumnItems->Add(AddOtherChoice(new Choice(ga->T("Show In Folder"))))->OnClick.Handle(this, &GameScreen::OnShowInFolder);
#endif
if (g_Config.bEnableCheats) {
@@ -261,10 +261,7 @@ void GameScreen::render() {
}
UI::EventReturn GameScreen::OnShowInFolder(UI::EventParams &e) {
#if defined(_WIN32) && !PPSSPP_PLATFORM(UWP)
std::string str = std::string("explorer.exe /select,\"") + ReplaceAll(gamePath_, "/", "\\") + "\"";
_wsystem(ConvertUTF8ToWString(str).c_str());
#endif
OpenDirectory(gamePath_.c_str());
return UI::EVENT_DONE;
}