summaryrefslogtreecommitdiffstats
path: root/wrapsdl.cpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-21 04:00:58 +0100
committerNao Pross <naopross@thearcway.org>2019-01-21 04:02:18 +0100
commitf40251efc21a4e2db446af73c810d1b063cf84fb (patch)
treedce905174d6020d11e885a860b3dbce6c7899b6e /wrapsdl.cpp
downloadlibwsdl2-f40251efc21a4e2db446af73c810d1b063cf84fb.tar.gz
libwsdl2-f40251efc21a4e2db446af73c810d1b063cf84fb.zip
Initial commit, add makefile, .gitignore and debug header
Diffstat (limited to '')
-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();
+}