diff --git a/SDL2pp/Renderer.cc b/SDL2pp/Renderer.cc index 969b6e2..7862de7 100644 --- a/SDL2pp/Renderer.cc +++ b/SDL2pp/Renderer.cc @@ -59,6 +59,11 @@ void Renderer::Clear() { throw Exception("SDL_RenderClear failed"); } +void Renderer::GetInfo(SDL_RendererInfo* info) { + if (SDL_GetRendererInfo(renderer_, info) != 0) + throw Exception("SDL_GetRendererInfo failed"); +} + void Renderer::Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect) { if (SDL_RenderCopy(renderer_, texture.Get(), srcrect.Get(), dstrect.Get()) != 0) throw Exception("SDL_RenderCopy failed"); diff --git a/SDL2pp/Renderer.hh b/SDL2pp/Renderer.hh index 5801638..034fe6e 100644 --- a/SDL2pp/Renderer.hh +++ b/SDL2pp/Renderer.hh @@ -52,6 +52,8 @@ public: void Present(); void Clear(); + void GetInfo(SDL_RendererInfo* info); + void Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect); void Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect, double angle, const Point& center, SDL_RendererFlip flip);