From 4d5302212175b45ae105c815595fc5956a225f63 Mon Sep 17 00:00:00 2001 From: raven02 Date: Fri, 19 Jul 2013 21:48:50 +0800 Subject: [PATCH] Use emnu{} to simplify different of texture filtering --- GPU/GLES/TextureCache.cpp | 4 ++-- GPU/GLES/TextureCache.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 31f3e889677d..e28ec1cd37dd 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -515,12 +515,12 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) { } } - if ((g_Config.iTexFiltering == 3 || (g_Config.iTexFiltering == 4 && g_iNumVideos)) && !gstate.isColorTestEnabled()) { + if ((g_Config.iTexFiltering == linear || (g_Config.iTexFiltering == linearFMV && g_iNumVideos)) && !gstate.isColorTestEnabled()) { magFilt |= 1; minFilt |= 1; } - if (g_Config.iTexFiltering == 2) { + if (g_Config.iTexFiltering == nearest) { magFilt &= ~1; minFilt &= ~1; } diff --git a/GPU/GLES/TextureCache.h b/GPU/GLES/TextureCache.h index 361885f41cd1..772374ca88db 100644 --- a/GPU/GLES/TextureCache.h +++ b/GPU/GLES/TextureCache.h @@ -25,6 +25,12 @@ struct VirtualFramebuffer; +enum TextureFiltering { + nearest = 2, + linear = 3, + linearFMV = 4, +}; + class TextureCache { public: