From 8b6ad4ff853f8577b4c1cc0aa7ced18e31827fe1 Mon Sep 17 00:00:00 2001 From: Akash Date: Sun, 22 Nov 2015 16:51:18 +0530 Subject: [PATCH] GSDX-TC: check userhacks for preload data frame --- plugins/GSdx/GSTextureCache.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 0ff9bca871..6e2ecbf4af 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -27,14 +27,15 @@ bool s_IS_OPENGL = false; GSTextureCache::GSTextureCache(GSRenderer* r) : m_renderer(r) { + bool userhacks = !!theApp.GetConfig("UserHacks", 0); s_IS_OPENGL = (static_cast(theApp.GetConfig("Renderer", static_cast(GSRendererType::Default))) == GSRendererType::OGL_HW); - m_spritehack = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_SpriteHack", 0) : 0; - UserHacks_HalfPixelOffset = !!theApp.GetConfig("UserHacks", 0) && !!theApp.GetConfig("UserHacks_HalfPixelOffset", 0); + m_spritehack = userhacks ? theApp.GetConfig("UserHacks_SpriteHack", 0) : 0; + UserHacks_HalfPixelOffset = userhacks && theApp.GetConfig("UserHacks_HalfPixelOffset", 0); m_paltex = !!theApp.GetConfig("paltex", 0); - m_preload_frame = theApp.GetConfig("preload_frame_with_gs_data", 0); - m_can_convert_depth = s_IS_OPENGL ? theApp.GetConfig("texture_cache_depth", 1) : 0; + m_preload_frame = userhacks && theApp.GetConfig("preload_frame_with_gs_data", 0); + m_can_convert_depth = s_IS_OPENGL && theApp.GetConfig("texture_cache_depth", 1); m_crc_hack_level = theApp.GetConfig("crc_hack_level", 3); m_temp = (uint8*)_aligned_malloc(1024 * 1024 * sizeof(uint32), 32);