diff --git a/src/text.cpp b/src/text.cpp index fa4ea2be333e..55f9d3bc5f8d 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -162,13 +162,6 @@ surface ttext::render() const return surface_; } -#if SDL_VERSION_ATLEAST(2,0,0) -sdl::ttexture ttext::render_as_texture() const -{ - rerender(); - return texture_; -} -#else #ifdef SDL_GPU sdl::ttexture ttext::render_as_texture() const { @@ -176,7 +169,6 @@ sdl::ttexture ttext::render_as_texture() const return texture_; } #endif -#endif int ttext::get_width() const { @@ -707,13 +699,8 @@ void ttext::rerender(const bool force) const surface_.assign(SDL_CreateRGBSurfaceFrom( surface_buffer_, width, height, 32, stride, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000)); -#if SDL_VERSION_ATLEAST(2,0,0) - texture_ = CVideo::get_window()->create_texture - (SDL_TEXTUREACCESS_STATIC, surface_); -#else #ifdef SDL_GPU texture_ = sdl::ttexture(surface_); -#endif #endif cairo_destroy(cr); cairo_surface_destroy(cairo_surface); diff --git a/src/text.hpp b/src/text.hpp index 1a1b22c4a5a6..d0aad57cb3fc 100644 --- a/src/text.hpp +++ b/src/text.hpp @@ -81,15 +81,6 @@ class ttext */ surface render() const; -#if SDL_VERSION_ATLEAST(2,0,0) - /** - * Returns the rendered text as a texture. - * - * Before rendering it tests whether a redraw is needed and if so it first - * redraws the texture before returning it. - */ - sdl::ttexture render_as_texture() const; -#else #ifdef SDL_GPU /** * Returns the rendered text as a texture. @@ -98,7 +89,6 @@ class ttext * redraws the texture before returning it. */ sdl::ttexture render_as_texture() const; -#endif #endif /** Returns the width needed for the text. */