From ae9c7791c2e563cfab92fd8910825dce4600e50f Mon Sep 17 00:00:00 2001 From: avihal Date: Wed, 20 Jun 2012 18:51:30 +0000 Subject: [PATCH] GSdx: Disable CRC hacks - cleanups: - Removed the #define DISABLE_CRC_HACKS (since it's at the GUI now). - reverted r5315 and r5319 (which prevented gs dumps to have a correct CRC). - Restored the functionality of these revisions via simple skip of the other hack calls. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5320 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GS.cpp | 7 +------ plugins/GSdx/GSCrc.cpp | 4 ++-- plugins/GSdx/GSRendererHW.cpp | 6 +----- plugins/GSdx/config.h | 6 ------ 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index 3c5d0b1e30..7ceaf593ea 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -745,12 +745,7 @@ EXPORT_C_(int) GSsetupRecording(int start, void* data) EXPORT_C GSsetGameCRC(uint32 crc, int options) { - int userHacks_DisableCrcHacks1 = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig( "UserHacks_DisableCrcHacks", 0 ) : 0; - - if (!userHacks_DisableCrcHacks1) - s_gs->SetGameCRC(crc, options); - else - s_gs->SetGameCRC(0xfffffffe, options); + s_gs->SetGameCRC(crc, options); } EXPORT_C GSgetLastTag(uint32* tag) diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index d98bae264b..c7ec7d483c 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -545,13 +545,13 @@ CRC::Game CRC::Lookup(uint32 crc) if(crcDups) printf("[FIXME] GSdx: Duplicate CRC: Overall: %d\n", crcDups); } -#ifndef DISABLE_CRC_HACKS + hash_map::iterator i = m_map.find(crc); if(i != m_map.end()) { return *i->second; } -#endif + return m_games[0]; } diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index 13a332b1cd..ffddb37aed 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -173,12 +173,8 @@ void GSRendererHW::Draw() { if(m_dev->IsLost()) return; - #ifndef DISABLE_CRC_HACKS - if(GSRenderer::IsBadFrame(m_skip, m_userhacks_skipdraw)) return; - #endif - GSDrawingEnvironment& env = m_env; GSDrawingContext* context = m_context; @@ -258,7 +254,7 @@ void GSRendererHW::Draw() s_n++; } - if(m_hacks.m_oi && !(this->*m_hacks.m_oi)(rt->m_texture, ds->m_texture, tex)) + if(!userHacks_DisableCrcHacks && m_hacks.m_oi && !(this->*m_hacks.m_oi)(rt->m_texture, ds->m_texture, tex)) { return; } diff --git a/plugins/GSdx/config.h b/plugins/GSdx/config.h index e044c24b34..bce22d5f81 100644 --- a/plugins/GSdx/config.h +++ b/plugins/GSdx/config.h @@ -32,12 +32,6 @@ //#define DISABLE_HW_TEXTURE_CACHE // Slow but fixes a lot of bugs -//#define DISABLE_CRC_HACKS // Disable all game specific hacks - -#if defined(DISABLE_HW_TEXTURE_CACHE) && !defined(DISABLE_CRC_HACKS) - #define DISABLE_CRC_HACKS -#endif - //#define DISABLE_BITMASKING //#define DISABLE_COLCLAMP