예제 #1
0
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);
}
예제 #2
0
        explicit SdlLibrary(const Uint32 flags)
            : _handle(::SDL_Init(flags))
        {
            if (0 == _handle) // if (the resource was successfully aquired)
            {
                return;
            }

            throw SdlException();
        }
예제 #3
0
        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();
        }