diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 1831d3c250..8ca4952f18 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -25,7 +25,7 @@ GSTextureCache::GSTextureCache(GSRenderer* r) : m_renderer(r) { - m_spritehack = !!theApp.GetConfig("UserHacks_SpriteHack", 0); + m_spritehack = theApp.GetConfig("UserHacks_SpriteHack", 0); m_paltex = !!theApp.GetConfig("paltex", 0); m_temp = (uint8*)_aligned_malloc(1024 * 1024 * sizeof(uint32), 32); @@ -585,8 +585,13 @@ GSTextureCache::Source* GSTextureCache::CreateSource(const GIFRegTEX0& TEX0, con if(dst == NULL) { - if(m_spritehack && TEX0.CPSM == 2 && (TEX0.PSM == 19 || TEX0.PSM == 27)) + if(m_spritehack && (TEX0.PSM == PSM_PSMT8 || TEX0.PSM == PSM_PSMT8H)) + { src->m_spritehack_t = true; + + if(m_spritehack == 2 && TEX0.CPSM != PSM_PSMCT16) + src->m_spritehack_t = false; + } else src->m_spritehack_t = false; diff --git a/plugins/GSdx/GSTextureCache.h b/plugins/GSdx/GSTextureCache.h index 7f5e3ba899..726917048c 100644 --- a/plugins/GSdx/GSTextureCache.h +++ b/plugins/GSdx/GSTextureCache.h @@ -119,7 +119,7 @@ protected: SourceMap m_src; list m_dst[2]; bool m_paltex; - bool m_spritehack; + int m_spritehack; uint8* m_temp; virtual Source* CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* t = NULL); diff --git a/plugins/GSdx/GSdx.rc b/plugins/GSdx/GSdx.rc index 061d51bc97..dadfc1de6f 100644 --- a/plugins/GSdx/GSdx.rc +++ b/plugins/GSdx/GSdx.rc @@ -117,7 +117,7 @@ BEGIN EDITTEXT IDC_SKIPDRAWHACKEDIT,122,259,40,14,ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,161,261,11,14 LTEXT "SkipDraw:",IDC_STATIC_TEXT_SKIPDRAW,89,261,33,8 - CONTROL "Sprite Hack",IDC_SPRITEHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,123,280,51,10 + CONTROL "Sprite Hack",IDC_SPRITEHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,123,280,51,10 LTEXT "HACKS DISABLED",IDC_HACKDISABLED,64,268,57,8,WS_DISABLED END @@ -207,7 +207,7 @@ BEGIN CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,179,82,10 CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,10,165,67,10 LTEXT "HW AA",IDC_STATIC_TEXT_HWAA,11,262,24,8 - CONTROL "Sprite Hack",IDC_SPRITEHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,279,51,10 + CONTROL "Sprite Hack",IDC_SPRITEHACK,"Button",BS_AUTO3STATE | WS_TABSTOP,125,279,51,10 LTEXT "HACKS DISABLED",IDC_HACKDISABLED,62,268,57,8,WS_DISABLED END