From d7fc09768d0c5771f11ad4cf1b40851e7a11a6aa Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 5 Aug 2017 06:56:47 -0700 Subject: [PATCH] Qt: Fix sprite export pausing game indefinitely (fixes #841) --- CHANGES | 1 + src/platform/qt/ObjView.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index ab8ed1790..a4b25f954 100644 --- a/CHANGES +++ b/CHANGES @@ -27,6 +27,7 @@ Bugfixes: - Qt: Fix GL display when loading a game from CLI (fixes mgba.io/i/843) - GB, GBA Savedata: Fix savestate-related save overwriting (fixes mgba.io/i/834) - Qt: Fix timezone issues with time overrides + - Qt: Fix sprite export pausing game indefinitely (fixes mgba.io/i/841) Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722) diff --git a/src/platform/qt/ObjView.cpp b/src/platform/qt/ObjView.cpp index 871a95cbc..7201b80bc 100644 --- a/src/platform/qt/ObjView.cpp +++ b/src/platform/qt/ObjView.cpp @@ -248,7 +248,6 @@ void ObjView::updateTilesGB(bool force) { #ifdef USE_PNG void ObjView::exportObj() { - CoreController::Interrupter interrupter(m_controller); QString filename = GBAApp::app()->getSaveFileName(this, tr("Export sprite"), tr("Portable Network Graphics (*.png)")); VFile* vf = VFileDevice::open(filename, O_WRONLY | O_CREAT | O_TRUNC); @@ -257,6 +256,7 @@ void ObjView::exportObj() { return; } + CoreController::Interrupter interrupter(m_controller); mTileCacheSetPalette(m_tileCache, m_objInfo.paletteSet); png_structp png = PNGWriteOpen(vf); png_infop info = PNGWriteHeader8(png, m_objInfo.width * 8, m_objInfo.height * 8);