From 71f2754e91828188ab25007f39e82bfe0da43512 Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 19 Dec 2012 21:33:10 +0100 Subject: [PATCH] Revert "Move shader path init to init_cg()." This reverts commit e0faf0cc47de08bebb429140d2875cc8d1335ff0. --- gfx/d3d9/d3d9.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gfx/d3d9/d3d9.cpp b/gfx/d3d9/d3d9.cpp index 60ff65d594..4bbbc87ea3 100644 --- a/gfx/d3d9/d3d9.cpp +++ b/gfx/d3d9/d3d9.cpp @@ -448,6 +448,13 @@ D3DVideo::D3DVideo(const video_info_t *info) : SetForegroundWindow(hWnd); SetFocus(hWnd); +#ifdef HAVE_CG + auto shader_type = g_settings.video.shader_type; + if ((shader_type == RARCH_SHADER_CG || + shader_type == RARCH_SHADER_AUTO) && *g_settings.video.cg_shader_path) + cg_shader = g_settings.video.cg_shader_path; +#endif + video_info = *info; init(video_info); @@ -581,11 +588,6 @@ void D3DVideo::process() #ifdef HAVE_CG bool D3DVideo::init_cg() { - auto shader_type = g_settings.video.shader_type; - if ((shader_type == RARCH_SHADER_CG || - shader_type == RARCH_SHADER_AUTO) && *g_settings.video.cg_shader_path) - cg_shader = g_settings.video.cg_shader_path; - cgCtx = cgCreateContext(); if (cgCtx == nullptr) return false;