summaryrefslogtreecommitdiff
path: root/Ports/milkytracker
diff options
context:
space:
mode:
authorjakewestrip <jakewestrip@live.com>2021-04-28 21:19:03 +1000
committerLinus Groh <mail@linusgroh.de>2021-04-30 09:26:12 +0200
commit81eab1a9d108beabe477bc052aa1b219f36812ed (patch)
tree2ced0addfde766a7f0729c3677046dce8aefb472 /Ports/milkytracker
parent1ce70bb418867bdb182e2d67dc6f983e2426745a (diff)
downloadserenity-81eab1a9d108beabe477bc052aa1b219f36812ed.zip
Ports: Remove SDL Timer replacement in MilkyTracker
Diffstat (limited to 'Ports/milkytracker')
-rw-r--r--Ports/milkytracker/patches/SDLTimerToLibCoreTimer.patch65
-rw-r--r--Ports/milkytracker/patches/SetTrackerLinks.patch2
2 files changed, 1 insertions, 66 deletions
diff --git a/Ports/milkytracker/patches/SDLTimerToLibCoreTimer.patch b/Ports/milkytracker/patches/SDLTimerToLibCoreTimer.patch
deleted file mode 100644
index 3320e9eee2..0000000000
--- a/Ports/milkytracker/patches/SDLTimerToLibCoreTimer.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- MilkyTracker-1.03.00/src/tracker/sdl/SDL_Main.cpp 2021-04-27 15:17:42.529000000 +1000
-+++ MilkyTracker-1.03.00/src/tracker/sdl/SDL_Main.cpp 2021-04-27 15:17:42.529000000 +1000
-@@ -68,6 +68,8 @@
-
- #include <SDL.h>
- #include "SDL_KeyTranslation.h"
-+
-+#include <LibCore/Timer.h>
- // ---------------------------- Tracker includes ----------------------------
- #include "PPUI.h"
- #include "DisplayDevice_SDL.h"
-@@ -83,7 +85,7 @@
- #endif
- // --------------------------------------------------------------------------
-
--static SDL_TimerID timer;
-+RefPtr<Core::Timer> m_timer;
-
- // Tracker globals
- static PPScreen* myTrackerScreen = NULL;
-@@ -163,11 +165,11 @@
- SDLUserEventMidiKeyUp,
- };
-
--static Uint32 SDLCALL timerCallback(Uint32 interval, void* param)
-+static void timerCallback()
- {
- if (!myTrackerScreen || !myTracker || !ticking)
- {
-- return interval;
-+ return;
- }
-
- SDL_UserEvent ev;
-@@ -219,8 +221,6 @@
- //PPEvent myEvent(eRMouseRepeat, &p, sizeof(PPPoint));
- //RaiseEventSerialized(&myEvent);
- }
--
-- return interval;
- }
-
- #ifdef HAVE_LIBRTMIDI
-@@ -834,7 +834,12 @@
- #endif
-
- // Try to create timer
-- timer = SDL_AddTimer(20, timerCallback, NULL);
-+ m_timer = Core::Timer::construct();
-+ m_timer->on_timeout = [&]() {
-+ timerCallback();
-+ };
-+ m_timer->set_interval(20);
-+ m_timer->start();
-
- // Start capturing text input events
- SDL_StartTextInput();
-@@ -1033,7 +1038,6 @@
- }
-
- ticking = false;
-- SDL_RemoveTimer(timer);
-
- globalMutex->lock();
- #ifdef HAVE_LIBRTMIDI
diff --git a/Ports/milkytracker/patches/SetTrackerLinks.patch b/Ports/milkytracker/patches/SetTrackerLinks.patch
index 1e9edce673..be7ef6566d 100644
--- a/Ports/milkytracker/patches/SetTrackerLinks.patch
+++ b/Ports/milkytracker/patches/SetTrackerLinks.patch
@@ -4,7 +4,7 @@
set(INSTALL_DEST ${CMAKE_INSTALL_BINDIR})
endif()
-+target_link_libraries(tracker -lSDL2 -lgui -lipc -lm -lcore)
++target_link_libraries(tracker -lSDL2 -lgui -lipc -lm)
+set(INSTALL_DEST bin)
+
install(TARGETS tracker DESTINATION ${INSTALL_DEST})