X-Git-Url: http://git.localhorst.tv/?p=space.git;a=blobdiff_plain;f=src%2Fapp%2FSDL.cpp;fp=src%2Fapp%2FSDL.cpp;h=e5b48ca3e0e4126977a6964cb677d895882e198a;hp=0000000000000000000000000000000000000000;hb=61c2d30a60d586cbe63885885c6a373c7713af1e;hpb=08d0e47634e1632c96ebe3308535a86f5e625b40 diff --git a/src/app/SDL.cpp b/src/app/SDL.cpp new file mode 100644 index 0000000..e5b48ca --- /dev/null +++ b/src/app/SDL.cpp @@ -0,0 +1,19 @@ +#include "SDL.h" + +#include +#include + + +namespace space { + +SDL::SDL(Uint32 flags) { + if (SDL_Init(flags) != 0) { + throw std::runtime_error(std::string("init SDL: ") + SDL_GetError()); + } +} + +SDL::~SDL() { + SDL_Quit(); +} + +}