GB Printer: Reset printer buffer index after printing

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

View File

@ -7,6 +7,7 @@ Emulation fixes:
- GB Audio: Deschedule channel 1 when disabled by sweep (fixes mgba.io/i/1467)
- GBA Memory: Fix STM/LDM to invalid VRAM
- GB: Fix savedata initialization (fixes mgba.io/i/1473, mgba.io/i/1478)
- GB Printer: Reset printer buffer index after printing
Other fixes:
- Switch: Fix threading-related crash on second launch
- Qt: Fix FPS target maxing out at 59.727 (fixes mgba.io/i/1421)

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;
}