From 0da293010911d0cfc29de28b2a554a47f9546616 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sat, 8 Jun 2019 14:35:52 +0300 Subject: [PATCH] Fix #175 --- Core/debugger.c | 2 +- Core/display.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/debugger.c b/Core/debugger.c index ba413ca..d8872a4 100644 --- a/Core/debugger.c +++ b/Core/debugger.c @@ -1529,7 +1529,7 @@ static bool lcd(GB_gameboy_t *gb, char *arguments, char *modifiers, const debugg } GB_log(gb, "LCDC:\n"); GB_log(gb, " LCD enabled: %s\n",(gb->io_registers[GB_IO_LCDC] & 128)? "Enabled" : "Disabled"); - GB_log(gb, " %s: %s\n", GB_is_cgb(gb)? (gb->cgb_mode? "Sprite priority flags" : "Background and Window") : "Background", + GB_log(gb, " %s: %s\n", (gb->cgb_mode? "Sprite priority flags" : "Background and Window"), (gb->io_registers[GB_IO_LCDC] & 1)? "Enabled" : "Disabled"); GB_log(gb, " Objects: %s\n", (gb->io_registers[GB_IO_LCDC] & 2)? "Enabled" : "Disabled"); GB_log(gb, " Object size: %s\n", (gb->io_registers[GB_IO_LCDC] & 4)? "8x16" : "8x8"); diff --git a/Core/display.c b/Core/display.c index c84b3a9..240e3c7 100644 --- a/Core/display.c +++ b/Core/display.c @@ -112,7 +112,7 @@ typedef struct __attribute__((packed)) { static bool window_enabled(GB_gameboy_t *gb) { if ((gb->io_registers[GB_IO_LCDC] & 0x1) == 0) { - if (!gb->cgb_mode && GB_is_cgb(gb)) { + if (!gb->cgb_mode) { return false; } } @@ -376,9 +376,6 @@ static void render_pixel_if_possible(GB_gameboy_t *gb) bg_enabled = false; } } - if (!GB_is_cgb(gb) && gb->in_window) { - bg_enabled = true; - } { uint8_t pixel = bg_enabled? fifo_item->pixel : 0;