diff --git a/client/SDL/SDL3/sdl_utils.cpp b/client/SDL/SDL3/sdl_utils.cpp index 436033106..49401d970 100644 --- a/client/SDL/SDL3/sdl_utils.cpp +++ b/client/SDL/SDL3/sdl_utils.cpp @@ -474,6 +474,21 @@ namespace sdl::utils return ss.str(); } + + std::string toString(SDL_Rect rect) + { + std::stringstream ss; + ss << "SDL_Rect{" << rect.x << "x" << rect.y << "-" << rect.w << "x" << rect.h << "}"; + return ss.str(); + } + + std::string toString(SDL_FRect rect) + { + std::stringstream ss; + ss << "SDL_Rect{" << rect.x << "x" << rect.y << "-" << rect.w << "x" << rect.h << "}"; + return ss.str(); + } + } // namespace sdl::utils namespace sdl::error diff --git a/client/SDL/SDL3/sdl_utils.hpp b/client/SDL/SDL3/sdl_utils.hpp index b4b449406..92ad4ec4d 100644 --- a/client/SDL/SDL3/sdl_utils.hpp +++ b/client/SDL/SDL3/sdl_utils.hpp @@ -86,6 +86,8 @@ namespace sdl::utils [[nodiscard]] std::string toString(SDL_DisplayOrientation orientation); [[nodiscard]] std::string toString(const SDL_DisplayMode* mode); [[nodiscard]] std::string toString(Uint32 type); + [[nodiscard]] std::string toString(SDL_Rect rect); + [[nodiscard]] std::string toString(SDL_FRect rect); [[nodiscard]] UINT32 orientaion_to_rdp(SDL_DisplayOrientation orientation);