[PATCH 3/5] wined3d: Simplify a condition in IWineD3DSurfaceImpl_LoadTexture().
Henri Verbeet
hverbeet at codeweavers.com
Fri Nov 12 06:12:03 CST 2010
---
dlls/wined3d/surface.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 8d848d2..618e3f0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2443,14 +2443,14 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BO
if (!(This->Flags & flag)) {
TRACE("Reloading because surface is dirty\n");
- } else if(/* Reload: gl texture has ck, now no ckey is set OR */
- ((This->Flags & SFLAG_GLCKEY) && (!(This->CKeyFlags & WINEDDSD_CKSRCBLT))) ||
- /* Reload: vice versa OR */
- ((!(This->Flags & SFLAG_GLCKEY)) && (This->CKeyFlags & WINEDDSD_CKSRCBLT)) ||
- /* Also reload: Color key is active AND the color key has changed */
- ((This->CKeyFlags & WINEDDSD_CKSRCBLT) && (
- (This->glCKey.dwColorSpaceLowValue != This->SrcBltCKey.dwColorSpaceLowValue) ||
- (This->glCKey.dwColorSpaceHighValue != This->SrcBltCKey.dwColorSpaceHighValue)))) {
+ }
+ /* Reload if either the texture and sysmem have different ideas about the
+ * color key, or the actual key values changed. */
+ else if (!(This->Flags & SFLAG_GLCKEY) != !(This->CKeyFlags & WINEDDSD_CKSRCBLT)
+ || ((This->CKeyFlags & WINEDDSD_CKSRCBLT)
+ && (This->glCKey.dwColorSpaceLowValue != This->SrcBltCKey.dwColorSpaceLowValue
+ || This->glCKey.dwColorSpaceHighValue != This->SrcBltCKey.dwColorSpaceHighValue)))
+ {
TRACE("Reloading because of color keying\n");
/* To perform the color key conversion we need a sysmem copy of
* the surface. Make sure we have it
--
1.7.2.2
More information about the wine-patches
mailing list