]> git.localhorst.tv Git - l2e.git/blob - InitSDL.cpp
e9654db4b4c6c9e8ef23d52657cd34992985109b
[l2e.git] / InitSDL.cpp
1 #include "InitSDL.h"
2
3 #include <stdexcept>
4
5 using std::runtime_error;
6
7
8 namespace sdl {
9
10 InitSDL::InitSDL(Uint32 flags) {
11         if (SDL_Init(flags) != 0) {
12                 throw runtime_error("failed to initialize SDL");
13         }
14 }
15
16 InitSDL::~InitSDL(void) {
17         SDL_Quit();
18 }
19
20 }