mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-25 01:00:01 +00:00
Win32: Change --gfx to --graphics (and its suboptions) to be consistent with Headless.
Also, software force-activates OpenGL mode, since it does not work with Direct3D currently. Thanks to @unknownbrackets for the suggestions.
This commit is contained in:
parent
a892779f89
commit
7a1be69ec0
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user