Skip to content

Commit

Permalink
Make GB_serial_set_data_bit a bit more thread safe
Browse files Browse the repository at this point in the history
  • Loading branch information
LIJI32 committed Nov 24, 2024
1 parent b4fc2ff commit 27a064c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/gb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,8 +1365,8 @@ void GB_serial_set_data_bit(GB_gameboy_t *gb, bool data)
gb->io_registers[GB_IO_SB] |= data;
gb->serial_count++;
if (gb->serial_count == 8) {
gb->io_registers[GB_IO_IF] |= 8;
gb->io_registers[GB_IO_SC] &= ~0x80;
gb->io_registers[GB_IO_IF] |= 8;
gb->serial_count = 0;
}
}
Expand Down

0 comments on commit 27a064c

Please sign in to comment.