gsdx: Improve OpenGL HW renderer checks

If OpenGL software is the saved ini renderer and F9 is pressed to toggle
to the hardware renderer, depth emulation will be disabled. This fixes
that issue.
This commit is contained in:
Jonathan Li 2017-03-24 08:54:58 +00:00 committed by Gregory Hainaut
parent a5282daf91
commit 85ddf69042
3 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ GSDeviceOGL::GSDeviceOGL()
// Reset the debug file
#ifdef ENABLE_OGL_DEBUG
if (static_cast<GSRendererType>(theApp.GetConfigI("Renderer")) == GSRendererType::OGL_SW)
if (theApp.GetCurrentRendererType() == GSRendererType::OGL_SW)
m_debug_gl_file = fopen("GSdx_opengl_debug_sw.txt","w");
else
m_debug_gl_file = fopen("GSdx_opengl_debug_hw.txt","w");

View File

@ -851,7 +851,7 @@ GSRendererHW::Hacks::Hacks()
, m_oo(NULL)
, m_cu(NULL)
{
bool is_opengl = (static_cast<GSRendererType>(theApp.GetConfigI("Renderer")) == GSRendererType::OGL_HW);
bool is_opengl = theApp.GetCurrentRendererType() == GSRendererType::OGL_HW;
bool can_handle_depth = (!theApp.GetConfigB("UserHacks") || !theApp.GetConfigB("UserHacks_DisableDepthSupport")) && is_opengl;
m_oi_list.push_back(HackEntry<OI_Ptr>(CRC::FFXII, CRC::EU, &GSRendererHW::OI_FFXII));

View File

@ -29,7 +29,7 @@ bool GSTextureCache::m_wrap_gs_mem = false;
GSTextureCache::GSTextureCache(GSRenderer* r)
: m_renderer(r)
{
s_IS_OPENGL = (static_cast<GSRendererType>(theApp.GetConfigI("Renderer")) == GSRendererType::OGL_HW);
s_IS_OPENGL = theApp.GetCurrentRendererType() == GSRendererType::OGL_HW;
if (theApp.GetConfigB("UserHacks")) {
m_spritehack = theApp.GetConfigI("UserHacks_SpriteHack");