X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fsdl%2FInitSDL.cpp;fp=src%2Fsdl%2FInitSDL.cpp;h=0f2eacd803040317db9e8c05e9f66f0e5d12b2bf;hb=5ceb9e51fd6768946c4a2d72aac13fa6bc78fa88;hp=0000000000000000000000000000000000000000;hpb=e411b1bbef7bc5bc383046e7bf294d2c5a17ac7e;p=l2e.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(); +} + +}