From bfc30a659e85785730d3130fc84000a382c2318e Mon Sep 17 00:00:00 2001 From: riccardom Date: Thu, 22 Jan 2009 20:13:05 +0000 Subject: [PATCH] gcc does not like to skip variable initialization with gotos --- desmume/src/GPU.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index eb2caaa24..06230c1dd 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -1595,6 +1595,8 @@ static BOOL setFinal3DColorSpecialDecreaseWnd(GPU *gpu, u32 passing, u8 *dst, u1 INLINE static void __setFinalColorBck(GPU *gpu, u32 passing, u8 bgnum, u8 *dst, u16 color, u16 x, bool opaque) { + int x_int; + //due to this early out, we will get incorrect behavior in cases where //we enable mosaic in the middle of a frame. this is deemed unlikely. if(!gpu->curr_mosaic_enabled) { @@ -1606,8 +1608,8 @@ INLINE static void __setFinalColorBck(GPU *gpu, u32 passing, u8 bgnum, u8 *dst, else color &= 0x7FFF; //due to the early out, enabled must always be true - //int x_int = enabled ? GPU::mosaicLookup.width[x].trunc : x; - int x_int = GPU::mosaicLookup.width[x].trunc; + //x_int = enabled ? GPU::mosaicLookup.width[x].trunc : x; + x_int = GPU::mosaicLookup.width[x].trunc; if(GPU::mosaicLookup.width[x].begin && GPU::mosaicLookup.height[gpu->currLine].begin) {} else color = gpu->MosaicColors.bg[bgnum][x_int];