From b8fca1e8e445e54cf74f43a11816041f1ba59b2d Mon Sep 17 00:00:00 2001 From: cyberwarriorx Date: Wed, 10 Jan 2007 17:49:12 +0000 Subject: [PATCH] -Fixed an issue where variables weren't being declared in the proper spot. This causes problems when compiling in Visual C++ --- desmume/src/GPU.c | 8 ++++---- desmume/src/GPU.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/desmume/src/GPU.c b/desmume/src/GPU.c index 9eccbe606..87e822cb2 100644 --- a/desmume/src/GPU.c +++ b/desmume/src/GPU.c @@ -127,6 +127,8 @@ void GPU_DeInit(GPU * gpu) /* Sets up LCD control variables for Display Engines A and B for quick reading */ void GPU_setVideoProp(GPU * gpu, u32 p) { + BOOL LayersEnable[5]; + u16 WinBG; struct _DISPCNT * cnt = &gpu->dispCnt.bitfield; gpu->dispCnt.integer = p; @@ -183,10 +185,8 @@ void GPU_setVideoProp(GPU * gpu, u32 p) GPU_setBGProp(gpu, 1, T1ReadWord(ARM9Mem.ARM9_REG, gpu->core * ADDRESS_STEP_4KB + 10)); GPU_setBGProp(gpu, 0, T1ReadWord(ARM9Mem.ARM9_REG, gpu->core * ADDRESS_STEP_4KB + 8)); -BOOL LayersEnable[5]; -u16 WinBG = (gpu->WINDOW_INCNT.val | gpu->WINDOW_OUTCNT.val); -WinBG = WinBG | (WinBG >> 8); - + WinBG = (gpu->WINDOW_INCNT.val | gpu->WINDOW_OUTCNT.val); + WinBG = WinBG | (WinBG >> 8); // Let's prepare the field for WINDOWS implementation LayersEnable[0] = gpu->dispBG[0] && (cnt->BG0_Enable || (WinBG & 0x1)); diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h index 3c720e3b6..351ed8d5a 100644 --- a/desmume/src/GPU.h +++ b/desmume/src/GPU.h @@ -434,8 +434,8 @@ static INLINE void GPU_ligne(Screen * screen, u16 l) for(i16 = 0; i16 < 256; ++i16) { COLOR dstColor; - dstColor.val = T1ReadWord(dst, i16 << 1); unsigned int r,g,b; // get components, 5bit each + dstColor.val = T1ReadWord(dst, i16 << 1); r = dstColor.bitfield.red; g = dstColor.bitfield.green; b = dstColor.bitfield.blue; @@ -474,8 +474,8 @@ static INLINE void GPU_ligne(Screen * screen, u16 l) for(i16 = 0; i16 < 256; ++i16) { COLOR dstColor; - dstColor.val = T1ReadWord(dst, i16 << 1); unsigned int r,g,b; // get components, 5bit each + dstColor.val = T1ReadWord(dst, i16 << 1); r = dstColor.bitfield.red; g = dstColor.bitfield.green; b = dstColor.bitfield.blue;