From 3448956f1f5b11a8ef0ea501e1993adfa1832459 Mon Sep 17 00:00:00 2001 From: Nolan Check Date: Wed, 29 Jul 2009 01:06:49 +0000 Subject: [PATCH] Correct addrRangesOverlap. May fix stuttering in many games. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3901 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.h | 7 +------ Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.h b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.h index f34c6b6ef7..dff0318e17 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.h @@ -56,12 +56,7 @@ const int MAX_VIRTUAL_XFB = 4; inline bool addrRangesOverlap(u32 aLower, u32 aUpper, u32 bLower, u32 bUpper) { - return ( - (aLower >= bLower && aLower < bUpper) || - (aUpper >= bLower && aUpper < bUpper) || - (bLower >= aLower && bLower < aUpper) || - (bUpper >= aLower && bUpper < aUpper) - ); + return !((aLower >= bUpper) || (bLower >= aUpper)); } struct XFBSource diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 5f885b5b02..e8e48a93fb 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -468,12 +468,7 @@ void VideoFifo_CheckSwapRequest() inline bool addrRangesOverlap(u32 aLower, u32 aUpper, u32 bLower, u32 bUpper) { - return ( - (aLower >= bLower && aLower < bUpper) || - (aUpper >= bLower && aUpper < bUpper) || - (bLower >= aLower && bLower < aUpper) || - (bUpper >= aLower && bUpper < aUpper) - ); + return !((aLower >= bUpper) || (bLower >= aUpper)); } // Run from the graphics thread (from Fifo.cpp)