From fb97de7f7981550406d7133ec897093d0194b5c8 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Sat, 9 Apr 2016 19:39:54 +0100 Subject: [PATCH] gsdx:windows: Fix crash on psx side of plugin I forgot it had a psx emu interface. --- plugins/GSdx/GPU.cpp | 3 +++ plugins/GSdx_legacy/GPU.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/plugins/GSdx/GPU.cpp b/plugins/GSdx/GPU.cpp index 3cb212d336..2c67f8a605 100644 --- a/plugins/GSdx/GPU.cpp +++ b/plugins/GSdx/GPU.cpp @@ -74,6 +74,7 @@ EXPORT_C_(int32) GPUclose() s_gpu = NULL; #ifdef _WIN32 + GSDeviceDX::FreeD3DCompiler(); if(SUCCEEDED(s_hr)) { @@ -105,6 +106,8 @@ EXPORT_C_(int32) GPUopen(void* hWnd) return -1; } + if (!GSDeviceDX::LoadD3DCompiler()) + return -1; #endif int renderer = theApp.GetConfig("Renderer", 1); diff --git a/plugins/GSdx_legacy/GPU.cpp b/plugins/GSdx_legacy/GPU.cpp index 3cb212d336..2c67f8a605 100644 --- a/plugins/GSdx_legacy/GPU.cpp +++ b/plugins/GSdx_legacy/GPU.cpp @@ -74,6 +74,7 @@ EXPORT_C_(int32) GPUclose() s_gpu = NULL; #ifdef _WIN32 + GSDeviceDX::FreeD3DCompiler(); if(SUCCEEDED(s_hr)) { @@ -105,6 +106,8 @@ EXPORT_C_(int32) GPUopen(void* hWnd) return -1; } + if (!GSDeviceDX::LoadD3DCompiler()) + return -1; #endif int renderer = theApp.GetConfig("Renderer", 1);