mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-26 07:43:36 +01:00
Win32: Add a command-line argument to pick the GPU backend.
This commit is contained in:
1 parent
c288a52975
commit
5fa929bbba
1 file changed
+12
@@ -435,6 +435,8 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
|
||||
bool debugLogLevel = false;
|
||||
|
||||
const std::wstring gpuBackend = L"--gfx=";
|
||||
|
||||
// The rest is handled in NativeInit().
|
||||
for (size_t i = 1; i < wideArgs.size(); ++i)
|
||||
{
|
||||
@@ -461,6 +463,16 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
|
||||
if (wideArgs[i] == L"--windowed")
|
||||
g_Config.bFullScreen = false;
|
||||
|
||||
if (wideArgs[i].find(gpuBackend) != std::wstring::npos && wideArgs[i].size() > gpuBackend.size())
|
||||
{
|
||||
const std::wstring restOfOption = wideArgs[i].substr(gpuBackend.size());
|
||||
|
||||
if (restOfOption == L"d3d")
|
||||
g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D9;
|
||||
else if (restOfOption == L"ogl")
|
||||
g_Config.iGPUBackend = GPU_BACKEND_OPENGL;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
Reference in new issue
Block a user