diff --git a/src/platform/qt/GameController.cpp b/src/platform/qt/GameController.cpp index bf59d7ee5..8cf59c8f1 100644 --- a/src/platform/qt/GameController.cpp +++ b/src/platform/qt/GameController.cpp @@ -332,7 +332,7 @@ void GameController::setConfig(const mCoreConfig* config) { } } -#ifdef USE_GDB_STUB +#ifdef USE_DEBUGGERS mDebugger* GameController::debugger() { if (!isLoaded()) { return nullptr; @@ -622,8 +622,9 @@ void GameController::closeGame() { if (!m_gameOpen) { return; } - +#ifdef USE_DEBUGGERS setDebugger(nullptr); +#endif if (mCoreThreadIsPaused(&m_threadContext)) { mCoreThreadUnpause(&m_threadContext); } diff --git a/src/platform/qt/GameController.h b/src/platform/qt/GameController.h index acd09f258..3fe79d087 100644 --- a/src/platform/qt/GameController.h +++ b/src/platform/qt/GameController.h @@ -86,7 +86,7 @@ public: int stateSlot() const { return m_stateSlot; } -#ifdef USE_GDB_STUB +#ifdef USE_DEBUGGERS mDebugger* debugger(); void setDebugger(mDebugger*); #endif diff --git a/src/platform/qt/ObjView.cpp b/src/platform/qt/ObjView.cpp index dc74bebb6..ae76ecf76 100644 --- a/src/platform/qt/ObjView.cpp +++ b/src/platform/qt/ObjView.cpp @@ -51,7 +51,11 @@ ObjView::ObjView(GameController* controller, QWidget* parent) connect(m_ui.magnification, static_cast(&QSpinBox::valueChanged), [this]() { updateTiles(true); }); +#ifdef USE_PNG connect(m_ui.exportButton, SIGNAL(clicked()), this, SLOT(exportObj())); +#else + m_ui.exportButton->setVisible(false); +#endif } void ObjView::selectObj(int obj) { @@ -242,6 +246,7 @@ void ObjView::updateTilesGB(bool force) { } #endif +#ifdef USE_PNG void ObjView::exportObj() { GameController::Interrupter interrupter(m_controller); QString filename = GBAApp::app()->getSaveFileName(this, tr("Export sprite"), @@ -282,6 +287,7 @@ void ObjView::exportObj() { PNGWriteClose(png, info); delete[] buffer; } +#endif bool ObjView::ObjInfo::operator!=(const ObjInfo& other) { return other.tile != tile || diff --git a/src/platform/qt/ObjView.h b/src/platform/qt/ObjView.h index 16a72961b..487a54264 100644 --- a/src/platform/qt/ObjView.h +++ b/src/platform/qt/ObjView.h @@ -21,8 +21,10 @@ Q_OBJECT public: ObjView(GameController* controller, QWidget* parent = nullptr); +#ifdef USE_PNG public slots: void exportObj(); +#endif private slots: void selectObj(int);