Allow D3D9 context creation to bail if shader compilation fails (D3D9 runtime not installed).
Fixes an issue where after switching to D3D9 on a PC without the D3D9 runtime, it's impossible to start PPSSPP anymore.
This commit is contained in:
parent
a6cf2e6ca0
commit
017d3da067
16 changed files with 45 additions and 18 deletions
|
@ -165,6 +165,13 @@ bool D3D9Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) {
|
|||
//deviceEx->SetMaximumFrameLatency(1);
|
||||
}
|
||||
draw_ = Draw::T3DCreateDX9Context(d3d_, d3dEx_, adapterId_, device_, deviceEx_);
|
||||
if (!draw_->CreatePresets()) {
|
||||
// Shader compiler not installed? Return an error so we can fall back to GL.
|
||||
device_->Release();
|
||||
d3d_->Release();
|
||||
*error_message = "DirectX9 runtime not correctly installed. Please install.";
|
||||
return false;
|
||||
}
|
||||
if (draw_)
|
||||
draw_->HandleEvent(Draw::Event::GOT_BACKBUFFER, 0, 0, nullptr);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue