]> git.localhorst.tv Git - orbi.git/blob - SDL.cpp
a7e2dab03744a0857a621dbb7806e0ccfd992a9f
[orbi.git] / SDL.cpp
1 #include "SDL.h"
2
3 #include <stdexcept>
4 #include <string>
5
6
7 namespace orbi {
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 }