diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 833a0ba74e..e31f399114 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -589,13 +589,23 @@ UI::EventReturn MainScreen::OnLoadFile(UI::EventParams &e) { } UI::EventReturn MainScreen::OnGameSelected(UI::EventParams &e) { - screenManager()->push(new GameScreen(e.s)); + #ifdef _WIN32 + std::string path = ReplaceAll(e.s, "//", "/"); +#else + std::string path = e.s; +#endif + screenManager()->push(new GameScreen(path)); return UI::EVENT_DONE; } UI::EventReturn MainScreen::OnGameSelectedInstant(UI::EventParams &e) { + #ifdef _WIN32 + std::string path = ReplaceAll(e.s, "//", "/"); +#else + std::string path = e.s; +#endif // Go directly into the game. - screenManager()->switchScreen(new EmuScreen(e.s)); + screenManager()->switchScreen(new EmuScreen(path)); return UI::EVENT_DONE; } diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 04af3825ae..cfe4693ee3 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -794,6 +794,7 @@ namespace MainWindow _splitpath(fullpath.c_str(), drive, dir, fname, ext); std::string executable = std::string(drive) + std::string(dir) + std::string(fname) + std::string(ext); + executable = ReplaceAll(executable, "\\", "/"); NativeMessageReceived("boot", executable.c_str()); } else {