diff options
author | Nao Pross <naopross@thearcway.org> | 2019-01-21 04:48:02 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2019-01-21 04:48:02 +0100 |
commit | ca091e358a8b02423ba304bfca055712b3a70881 (patch) | |
tree | 71252ee4f0316387fd2c335fe299313b5b313167 /wrapsdl2.cpp | |
parent | Initial commit, add makefile, .gitignore and debug header (diff) | |
download | libwsdl2-ca091e358a8b02423ba304bfca055712b3a70881.tar.gz libwsdl2-ca091e358a8b02423ba304bfca055712b3a70881.zip |
Add basic window wrapper
Diffstat (limited to '')
-rw-r--r-- | wrapsdl2.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/wrapsdl2.cpp b/wrapsdl2.cpp new file mode 100644 index 0000000..6c7896f --- /dev/null +++ b/wrapsdl2.cpp @@ -0,0 +1,19 @@ +#include "wrapsdl2.hpp" +#include "debug.hpp" + +extern "C" { +#include <SDL2/SDL.h> +} + +bool wrapsdl2::initialize(void) { + if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) { + npdebug("failed to initialize sdl video subsystem"); + return false; + } + + return true; +} + +void wrapsdl2::quit(void) { + SDL_Quit(); +} |