X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fsdl%2FInitSDL.cpp;fp=src%2Fsdl%2FInitSDL.cpp;h=0f2eacd803040317db9e8c05e9f66f0e5d12b2bf;hb=8b4877fe48d21d7e789cf52f81c1d6a87b06bcbc;hp=0000000000000000000000000000000000000000;hpb=42db59e3850c958821e8396fadc20fbeb71050c4;p=sdl-test8.git diff --git a/src/sdl/InitSDL.cpp b/src/sdl/InitSDL.cpp new file mode 100644 index 0000000..0f2eacd --- /dev/null +++ b/src/sdl/InitSDL.cpp @@ -0,0 +1,27 @@ +/* + * InitSDL.cpp + * + * Created on: Apr 22, 2012 + * Author: holy + */ + +#include "InitSDL.h" + +#include + +using std::runtime_error; + + +namespace sdl { + +InitSDL::InitSDL(Uint32 flags) { + if (SDL_Init(flags) != 0) { + throw runtime_error("failed to initialize SDL"); + } +} + +InitSDL::~InitSDL(void) { + SDL_Quit(); +} + +}