Object aborts are DMG only, commit 34cf0f5 accidentally made them happen on CGB

This commit is contained in:
Lior Halphon 2023-02-18 22:30:35 +02:00
parent 22afa576c2
commit 29e920697a
1 changed files with 1 additions and 1 deletions

View File

@ -1489,7 +1489,7 @@ static void write_high_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
GB_lcd_off(gb);
}
/* Handle disabling objects while already fetching an object */
if ((gb->io_registers[GB_IO_LCDC] & GB_LCDC_OBJ_EN) && !(value & GB_LCDC_OBJ_EN)) {
if (!GB_is_cgb(gb) && (gb->io_registers[GB_IO_LCDC] & GB_LCDC_OBJ_EN) && !(value & GB_LCDC_OBJ_EN)) {
if (gb->during_object_fetch) {
gb->cycles_for_line += gb->display_cycles / 2;
gb->display_cycles = 0;