From 9d376335b722c627b00061d89143c5a70ddeeb99 Mon Sep 17 00:00:00 2001
From: Arisotura <thetotalworm@gmail.com>
Date: Fri, 13 Sep 2019 22:43:02 +0200
Subject: HARK HARK HARK HARK

---
 src/libui_sdl/main.cpp | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

(limited to 'src/libui_sdl/main.cpp')

diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp
index d4afa22..13778ec 100644
--- a/src/libui_sdl/main.cpp
+++ b/src/libui_sdl/main.cpp
@@ -48,6 +48,10 @@
 
 #include "OSD.h"
 
+#ifdef MELONCAP
+#include "MelonCap.h"
+#endif // MELONCAP
+
 
 // savestate slot mapping
 // 1-8: regular slots (quick access)
@@ -999,6 +1003,10 @@ int EmuThreadFunc(void* burp)
             // emulate
             u32 nlines = NDS::RunFrame();
 
+#ifdef MELONCAP
+            MelonCap::Update();
+#endif // MELONCAP
+
             if (EmuRunning == 0) break;
 
             if (Screen_UseGL)
@@ -2739,6 +2747,10 @@ int main(int argc, char** argv)
     uiMenuItemSetChecked(MenuItem_AudioSync, Config::AudioSync==1);
     uiMenuItemSetChecked(MenuItem_ShowOSD, Config::ShowOSD==1);
 
+#ifdef MELONCAP
+    MelonCap::Init();
+#endif // MELONCAP
+
     AudioSync = SDL_CreateCond();
     AudioSyncLock = SDL_CreateMutex();
 
@@ -2822,6 +2834,10 @@ int main(int argc, char** argv)
 
     if (MicWavBuffer) delete[] MicWavBuffer;
 
+#ifdef MELONCAP
+    MelonCap::DeInit();
+#endif // MELONCAP
+
     if (ScreenBitmap[0]) uiDrawFreeBitmap(ScreenBitmap[0]);
     if (ScreenBitmap[1]) uiDrawFreeBitmap(ScreenBitmap[1]);
 
-- 
cgit v1.2.3