summaryrefslogtreecommitdiffstats
path: root/wrapsdl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wrapsdl.cpp')
-rw-r--r--wrapsdl.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/wrapsdl.cpp b/wrapsdl.cpp
new file mode 100644
index 0000000..e91ec8c
--- /dev/null
+++ b/wrapsdl.cpp
@@ -0,0 +1,19 @@
+#include "wrapsdl.hpp"
+#include "debug.hpp"
+
+extern "C" {
+#include <SDL2/SDL.h>
+}
+
+bool wrapsdl::initialize(void) {
+ if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) {
+ npdebug("failed to initialize sdl video subsystem");
+ return false;
+ }
+
+ return true;
+}
+
+void wrapsdl::quit(void) {
+ SDL_Quit();
+}