From b081028575664d5a0aac886dec7b4d97d2310916 Mon Sep 17 00:00:00 2001 From: Maschell Date: Mon, 27 Apr 2020 13:03:54 +0200 Subject: [PATCH] Changes to be compatible to the latest libgui version --- Makefile | 2 +- src/Application.cpp | 1 + src/menu/HomebrewLaunchWindow.cpp | 1 + src/menu/ProgressWindow.h | 1 + src/system/AsyncDeleter.cpp | 2 +- src/system/AsyncDeleter.h | 7 ++++--- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 61ab374..fb45aa7 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ LIBS := -lgui -lfreetype -lgd -lpng -ljpeg -lz -lmad -lvorbisidec -logg -lbz2 - # list of directories containing libraries, this must be the top level # containing include and lib #------------------------------------------------------------------------------- -LIBDIRS := $(PORTLIBS) $(WUT_ROOT) +LIBDIRS := $(PORTLIBS) $(WUT_ROOT) $(WUT_ROOT)/usr #------------------------------------------------------------------------------- diff --git a/src/Application.cpp b/src/Application.cpp index 2e843cb..39d7ac9 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -27,6 +27,7 @@ #include "resources/Resources.h" #include #include "system/memory.h" +#include "system/AsyncDeleter.h" #include "utils/logger.h" Application *Application::applicationInstance = NULL; diff --git a/src/menu/HomebrewLaunchWindow.cpp b/src/menu/HomebrewLaunchWindow.cpp index 7ac6663..d5a4e85 100644 --- a/src/menu/HomebrewLaunchWindow.cpp +++ b/src/menu/HomebrewLaunchWindow.cpp @@ -23,6 +23,7 @@ #include "resources/Resources.h" #include "utils/utils.h" #include "Application.h" +#include "system/AsyncDeleter.h" #include diff --git a/src/menu/ProgressWindow.h b/src/menu/ProgressWindow.h index d344495..606e7d2 100644 --- a/src/menu/ProgressWindow.h +++ b/src/menu/ProgressWindow.h @@ -18,6 +18,7 @@ #define _PROGRESS_WINDOW_H_ #include "gui/Gui.h" +#include "system/CMutex.h" class ProgressWindow : public GuiFrame, public sigslot::has_slots<> { public: diff --git a/src/system/AsyncDeleter.cpp b/src/system/AsyncDeleter.cpp index e6533b6..420d272 100644 --- a/src/system/AsyncDeleter.cpp +++ b/src/system/AsyncDeleter.cpp @@ -52,7 +52,7 @@ void AsyncDeleter::executeThread(void) { //! because otherwise they would block or do invalid access on GUI thread while(!realDeleteElements.empty()) { deleteMutex.lock(); - AsyncDeleter::Element *element = realDeleteElements.front(); + GuiElement *element = realDeleteElements.front(); realDeleteElements.pop(); deleteMutex.unlock(); diff --git a/src/system/AsyncDeleter.h b/src/system/AsyncDeleter.h index dd8f834..c28251b 100644 --- a/src/system/AsyncDeleter.h +++ b/src/system/AsyncDeleter.h @@ -18,6 +18,7 @@ #define _ASYNC_DELETER_H #include +#include #include "CThread.h" #include "CMutex.h" @@ -34,7 +35,7 @@ public: virtual ~Element() {} }; - static void pushForDelete(AsyncDeleter::Element *e) { + static void pushForDelete(GuiElement *e) { if(!deleterInstance) deleterInstance = new AsyncDeleter; @@ -52,8 +53,8 @@ private: void executeThread(void); bool exitApplication; - std::queue deleteElements; - std::queue realDeleteElements; + std::queue deleteElements; + std::queue realDeleteElements; CMutex deleteMutex; };