mirror of https://github.com/LIJI32/SameBoy.git
Fix WX=0 regression
This commit is contained in:
parent
537d0e1b25
commit
029b7492b6
|
@ -1647,13 +1647,13 @@ void GB_display_run(GB_gameboy_t *gb, unsigned cycles, bool force)
|
|||
if (!gb->wx_triggered && gb->wy_triggered && (gb->io_registers[GB_IO_LCDC] & 0x20)) {
|
||||
bool should_activate_window = false;
|
||||
if (gb->io_registers[GB_IO_WX] == 0) {
|
||||
static const uint8_t scx_to_wx0_comparisons[] = {-7, -9, -10, -11, -12, -13, -14, -14};
|
||||
static const uint8_t scx_to_wx0_comparisons[] = {-7, -1, -2, -3, -4, -5, -6, -6};
|
||||
if (gb->position_in_line == scx_to_wx0_comparisons[gb->io_registers[GB_IO_SCX] & 7]) {
|
||||
should_activate_window = true;
|
||||
}
|
||||
}
|
||||
else if (gb->wx166_glitch) {
|
||||
static const uint8_t scx_to_wx166_comparisons[] = {-8, -9, -10, -11, -12, -13, -14, -15};
|
||||
static const uint8_t scx_to_wx166_comparisons[] = {-16, -1, -2, -3, -4, -5, -6, -7};
|
||||
if (gb->position_in_line == scx_to_wx166_comparisons[gb->io_registers[GB_IO_SCX] & 7]) {
|
||||
should_activate_window = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue