mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
d3d9: Allow software rendering selection in UI.
This commit is contained in:
parent
ac4ee88c73
commit
841267c083
4 changed files with 7 additions and 14 deletions
|
@ -98,10 +98,13 @@ void EmuScreen::bootGame(const std::string &filename) {
|
|||
|
||||
CoreParameter coreParam;
|
||||
coreParam.cpuCore = g_Config.bJit ? CPU_JIT : CPU_INTERPRETER;
|
||||
coreParam.gpuCore = g_Config.bSoftwareRendering ? GPU_SOFTWARE : GPU_GLES;
|
||||
coreParam.gpuCore = GPU_GLES;
|
||||
if (GetGPUBackend() == GPUBackend::DIRECT3D9) {
|
||||
coreParam.gpuCore = GPU_DIRECTX9;
|
||||
}
|
||||
if (g_Config.bSoftwareRendering) {
|
||||
coreParam.gpuCore = GPU_SOFTWARE;
|
||||
}
|
||||
// Preserve the existing graphics context.
|
||||
coreParam.graphicsContext = PSP_CoreParameter().graphicsContext;
|
||||
coreParam.enableSound = g_Config.bEnableSound;
|
||||
|
|
|
@ -329,7 +329,7 @@ void GameSettingsScreen::CreateViews() {
|
|||
CheckBox *softwareGPU = graphicsSettings->Add(new CheckBox(&g_Config.bSoftwareRendering, gr->T("Software Rendering", "Software Rendering (experimental)")));
|
||||
softwareGPU->OnClick.Handle(this, &GameSettingsScreen::OnSoftwareRendering);
|
||||
|
||||
if (PSP_IsInited() || g_Config.iGPUBackend != GPU_BACKEND_OPENGL)
|
||||
if (PSP_IsInited())
|
||||
softwareGPU->SetEnabled(false);
|
||||
|
||||
// Audio
|
||||
|
@ -876,11 +876,6 @@ void GameSettingsScreen::CallbackRenderingBackend(bool yes) {
|
|||
// If the user ends up deciding not to restart, set the config back to the current backend
|
||||
// so it doesn't get switched by accident.
|
||||
if (yes) {
|
||||
if (g_Config.iGPUBackend == (int)GPUBackend::DIRECT3D9) {
|
||||
// TODO: Remove once software renderer supports D3D9.
|
||||
g_Config.bSoftwareRendering = false;
|
||||
}
|
||||
|
||||
g_Config.bRestartRequired = true;
|
||||
PostMessage(MainWindow::GetHWND(), WM_CLOSE, 0, 0);
|
||||
} else {
|
||||
|
|
|
@ -691,8 +691,6 @@ namespace MainWindow {
|
|||
|
||||
case ID_OPTIONS_DIRECT3D9:
|
||||
g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D9;
|
||||
// TODO: Remove once software renderer supports D3D9.
|
||||
g_Config.bSoftwareRendering = false;
|
||||
g_Config.bRestartRequired = true;
|
||||
PostMessage(MainWindow::GetHWND(), WM_CLOSE, 0, 0);
|
||||
break;
|
||||
|
|
|
@ -472,13 +472,10 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
|||
if (restOfOption == L"directx9") {
|
||||
g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D9;
|
||||
g_Config.bSoftwareRendering = false;
|
||||
}
|
||||
else if (restOfOption == L"gles") {
|
||||
} else if (restOfOption == L"gles") {
|
||||
g_Config.iGPUBackend = GPU_BACKEND_OPENGL;
|
||||
g_Config.bSoftwareRendering = false;
|
||||
}
|
||||
|
||||
else if (restOfOption == L"software") {
|
||||
} else if (restOfOption == L"software") {
|
||||
g_Config.iGPUBackend = GPU_BACKEND_OPENGL;
|
||||
g_Config.bSoftwareRendering = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue