diff --git a/Windows/main.cpp b/Windows/main.cpp index 4d0debc8d2..414c1cb0b8 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -434,7 +434,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin bool debugLogLevel = false; - const std::wstring gpuBackend = L"--gfx="; + const std::wstring gpuBackend = L"--graphics="; // The rest is handled in NativeInit(). for (size_t i = 1; i < wideArgs.size(); ++i) { @@ -465,10 +465,23 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin 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") + // Force software rendering off, as picking directx9 or gles implies HW acceleration. + // Once software rendering supports Direct3D9/11, we can add more options for software, + // such as "software-gles", "software-d3d9", and "software-d3d11", or something similar. + // For now, software rendering force-activates OpenGL. + if (restOfOption == L"directx9") { g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D9; - else if (restOfOption == L"ogl") + g_Config.bSoftwareRendering = false; + } + else if (restOfOption == L"gles") { g_Config.iGPUBackend = GPU_BACKEND_OPENGL; + g_Config.bSoftwareRendering = false; + } + + else if (restOfOption == L"software") { + g_Config.iGPUBackend = GPU_BACKEND_OPENGL; + g_Config.bSoftwareRendering = true; + } } } }