inline void sdl_img_throw_error(const std::string &functionname){ auto error = std::string("Error-") + functionname; error += ": "; error+= IMG_GetError(); error += '\n'; throw SdlException(error); }
explicit SdlLibrary(const Uint32 flags) : _handle(::SDL_Init(flags)) { if (0 == _handle) // if (the resource was successfully aquired) { return; } throw SdlException(); }
WindowHandle( const char *title, int x, int y, int w, int h, Uint32 flags ) : _handle(::SDL_CreateWindow(title, x, y, w, h, flags)) { if (nullptr != _handle) // if (the resource was successfully aquired) { return; } throw SdlException(); }