[client,sdl] add toString for SDL_Rect

This commit is contained in:
Armin Novak
2026-02-14 09:38:22 +01:00
parent 28fc9a23a1
commit 1b577a755e
2 changed files with 17 additions and 0 deletions

View File

@@ -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

View File

@@ -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);