From 6a7c084177da6ea481b7e4451fe336bc114724df Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Mon, 18 Jun 2018 21:57:01 +0300 Subject: [PATCH] Fixed window regression --- Core/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/display.c b/Core/display.c index 0fa6e7b..a2d3c18 100644 --- a/Core/display.c +++ b/Core/display.c @@ -1075,7 +1075,7 @@ void GB_window_related_write(GB_gameboy_t *gb, uint8_t addr, uint8_t value) gb->io_registers[addr] = value; bool after = window_enabled(gb); - if (before != after && gb->current_line >= LINES) { + if (before != after && gb->current_line < LINES) { /* Window was disabled or enabled outside of vblank */ if (gb->current_line >= gb->io_registers[GB_IO_WY]) { if (after) {