]> git.localhorst.tv Git - space.git/blob - src/app/SDL.cpp
move to SDL2
[space.git] / src / app / SDL.cpp
1 #include "SDL.h"
2
3 #include <stdexcept>
4 #include <string>
5
6
7 namespace space {
8
9 SDL::SDL(Uint32 flags) {
10         if (SDL_Init(flags) != 0) {
11                 throw std::runtime_error(std::string("init SDL: ") + SDL_GetError());
12         }
13 }
14
15 SDL::~SDL() {
16         SDL_Quit();
17 }
18
19 }