From a727e222654f2b4aa1c27e217b9ec3a31800d950 Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Sat, 27 Jul 2019 19:35:58 +0800 Subject: [PATCH] GB: Rename this variable to isolate from a global variable of the same name - this is a temporary variable and should only affect on this section, and not the global one. --- src/gb/GB.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gb/GB.cpp b/src/gb/GB.cpp index 1ae775821..d2da5abc2 100644 --- a/src/gb/GB.cpp +++ b/src/gb/GB.cpp @@ -4830,16 +4830,16 @@ void gbEmulate(int ticksToStop) //(fixes a part of Carmaggedon problem) if ((register_LCDC & 0x01 || gbCgbMode) && (register_LCDC & 0x20) && (gbWindowLine != -2)) { - int inUseRegister_WY = 0; + int tempinUseRegister_WY = inUseRegister_WY; int tempgbWindowLine = gbWindowLine; if ((tempgbWindowLine == -1) || (tempgbWindowLine > 144)) { - inUseRegister_WY = oldRegister_WY; + tempinUseRegister_WY = oldRegister_WY; if (register_LY > oldRegister_WY) tempgbWindowLine = 146; } - if (register_LY >= inUseRegister_WY) { + if (register_LY >= tempinUseRegister_WY) { if (tempgbWindowLine == -1) tempgbWindowLine = 0;