GB Printer: Reset printer buffer index after printing

This commit is contained in:
Vicki Pfau 2019-08-01 20:11:12 -07:00
parent 9fa7767ed9
commit 2d737ff367
2 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,7 @@ Emulation fixes:
- GBA Memory: Fix STM/LDM to invalid VRAM
- GB: Fix savedata initialization (fixes mgba.io/i/1473, mgba.io/i/1478)
- GB Memory: Better emulate 0xFEA0 region on DMG, MGB and AGB
- GB Printer: Reset printer buffer index after printing
Other fixes:
- Qt: Fix some Qt display driver race conditions
- Core: Improved lockstep driver reliability (Le Hoang Quyen)

View File

@ -222,6 +222,7 @@ static uint8_t GBPrinterWriteSC(struct GBSIODriver* driver, uint8_t value) {
printer->print(printer, printer->currentIndex * 4 / GB_VIDEO_HORIZONTAL_PIXELS, printer->buffer);
}
printer->printWait = -1;
printer->currentIndex = 0;
} else if (printer->printWait > 0) {
--printer->printWait;
}