]> git.localhorst.tv Git - l2e.git/blob - InitImage.cpp
5a4eb52b4067dc62ebb6ec7a88a6a9ee4f101c24
[l2e.git] / InitImage.cpp
1 #include "InitImage.h"
2
3 #include <SDL_image.h>
4 #include <stdexcept>
5
6 using std::runtime_error;
7
8 namespace sdl {
9
10 InitImage::InitImage(int flags) {
11         if (IMG_Init(flags) != flags) {
12                 throw runtime_error(IMG_GetError());
13         }
14 }
15
16 InitImage::~InitImage() {
17         IMG_Quit();
18 }
19
20 }