コード例 #1
0
ファイル: wrap.cpp プロジェクト: important-business/engine
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
ファイル: sdl_library.hpp プロジェクト: ChrisG0x20/ColorWheel
        explicit SdlLibrary(const Uint32 flags)
            : _handle(::SDL_Init(flags))
        {
            if (0 == _handle) // if (the resource was successfully aquired)
            {
                return;
            }

            throw SdlException();
        }
コード例 #3
0
ファイル: sdl_window.hpp プロジェクト: ChrisG0x20/ColorWheel
        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();
        }