// // SDLImageWrapper.cpp // gui // // Created by Bob Polis at 2020-10-14 // Copyright (c) 2020 SwiftCoder. All rights reserved. // #include #include #include "SDLImageWrapper.hpp" using namespace sc::gui; SDLImageWrapper::SDLImageWrapper() { int flags = IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_TIF; int result = IMG_Init(flags); if ((result & flags) != flags) { throw std::runtime_error(IMG_GetError()); } } SDLImageWrapper::~SDLImageWrapper() { IMG_Quit(); }