d3d9: Allow software rendering selection in UI.

This commit is contained in:
Unknown W. Brackets 2016-02-13 12:22:06 -08:00
parent ac4ee88c73
commit 841267c083
4 changed files with 7 additions and 14 deletions

View file

@ -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;

View file

@ -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 {

View file

@ -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;

View file

@ -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;
}