mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 18:20:33 +00:00
Qt: Fix printing race conditions
This commit is contained in:
parent
8d9d644dfe
commit
66ce1063d4
@ -640,6 +640,7 @@ void CoreController::attachPrinter() {
|
||||
}
|
||||
QMetaObject::invokeMethod(qPrinter->parent, "imagePrinted", Q_ARG(const QImage&, image));
|
||||
};
|
||||
Interrupter interrupter(this);
|
||||
GBSIOSetDriver(&gb->sio, &m_printer.d.d);
|
||||
#endif
|
||||
}
|
||||
@ -649,6 +650,7 @@ void CoreController::detachPrinter() {
|
||||
if (platform() != PLATFORM_GB) {
|
||||
return;
|
||||
}
|
||||
Interrupter interrupter(this);
|
||||
GB* gb = static_cast<GB*>(m_threadContext.core->board);
|
||||
GBPrinterDonePrinting(&m_printer.d);
|
||||
GBSIOSetDriver(&gb->sio, nullptr);
|
||||
@ -660,6 +662,7 @@ void CoreController::endPrint() {
|
||||
if (platform() != PLATFORM_GB) {
|
||||
return;
|
||||
}
|
||||
Interrupter interrupter(this);
|
||||
GBPrinterDonePrinting(&m_printer.d);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user