aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1f15c6e..f055db5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -34,6 +34,13 @@
/*
* Declarations
*/
+extern "C" {
+
+int main(int argc, char **argv);
+static void cleanup(void);
+
+}
+
SDL_Surface *screen;
OSCServer osc_server;
@@ -194,7 +201,7 @@ main(int argc, char **argv)
SDL_ERROR("SDL_Init");
return EXIT_FAILURE;
}
- atexit(SDL_Quit);
+ atexit(cleanup);
SDL_WM_SetCaption("OSC Graphics", NULL);
@@ -235,6 +242,12 @@ main(int argc, char **argv)
return EXIT_FAILURE;
}
+static void
+cleanup(void)
+{
+ SDL_Quit();
+}
+
#if defined(__WIN32__) && defined(main)
#undef main
/*