all repos — mgba @ 66ce1063d419624c5829a151b320faa9510ff6c1

mGBA Game Boy Advance Emulator

Qt: Fix printing race conditions
Vicki Pfau vi@endrift.com
Tue, 10 Oct 2017 22:30:28 -0700
commit

66ce1063d419624c5829a151b320faa9510ff6c1

parent

8d9d644dfefa94686a16dd09b3b931eeabc907d8

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/CoreController.cppsrc/platform/qt/CoreController.cpp

@@ -640,6 +640,7 @@ }

} 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 @@ #ifdef M_CORE_GB

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 @@ #ifdef M_CORE_GB

if (platform() != PLATFORM_GB) { return; } + Interrupter interrupter(this); GBPrinterDonePrinting(&m_printer.d); #endif }