diff --git a/Core/CmdLine.h b/Core/CmdLine.h index f6548738a0..cfd9c4977b 100644 --- a/Core/CmdLine.h +++ b/Core/CmdLine.h @@ -10,6 +10,8 @@ struct CommandLineOptions { std::optional softwareRendering; std::optional enableLogging; + std::optional bootFilename; + #ifndef _DEBUG bool showLogWindow = false; #else diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 6dcb681def..158f979bed 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -437,6 +437,10 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch g_VFS.Register("", new DirectoryReader(Path("/usr/local/share/games/ppsspp/assets"))); g_VFS.Register("", new DirectoryReader(Path("/usr/share/ppsspp/assets"))); g_VFS.Register("", new DirectoryReader(Path("/usr/share/games/ppsspp/assets"))); +#elif defined(_WIN32) && !PPSSPP_PLATFORM(UWP) + const Path &exePath = File::GetExeDirectory(); + g_VFS.Register("", new DirectoryReader(exePath / "assets")); + g_VFS.Register("", new DirectoryReader(exePath)); #endif #if PPSSPP_PLATFORM(SWITCH) diff --git a/Windows/main.cpp b/Windows/main.cpp index 6435da6684..0b299ab4d5 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -1062,10 +1062,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin TimeInit(); WinMainInit(); - const Path &exePath = File::GetExeDirectory(); - g_VFS.Register("", new DirectoryReader(exePath / "assets")); - g_VFS.Register("", new DirectoryReader(exePath)); - g_langRegion = GetDefaultLangRegion(); g_osName = GetWindowsVersion() + " " + GetWindowsSystemArchitecture(); @@ -1102,6 +1098,8 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin } #endif + NativeInit((int)args.size(), args.data(), "", "", nullptr); + // Consider at least the following cases before changing this code: // - By default in Release, the console should be hidden by default even if logging is enabled. // - By default in Debug, the console should be shown by default. @@ -1149,8 +1147,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin MainWindow::Minimize(); } - NativeInit((int)args.size(), args.data(), "", "", nullptr); - // Emu thread (and render thread, if any) is always running! // OpenGL uses an externally managed render thread (due to GL's single-threaded context design). // Vulkan manages its own render thread. Our D3D backend doesn't have a render thread.