Current status of SDL.

This commit is contained in:
BadQuanta
2026-05-13 19:48:22 +00:00
parent 28e9c4ba18
commit 15bb051619
24 changed files with 1806 additions and 360 deletions
+7
View File
@@ -17,6 +17,13 @@ namespace hdk::sdl {
SDL_DisplayOrientation GetCurrentOrientation() const { return SDL_GetCurrentDisplayOrientation(*this); }
const SDL_DisplayMode* GetDesktopMode() const { return SDL_GetDesktopDisplayMode(*this); }
bool GetBounds(SDL_Rect* rect) const { return SDL_GetDisplayBounds(*this, rect); }
SDL_Rect GetBounds() const {
SDL_Rect rect;
if (GetBounds(&rect)) {
return rect;
}
return SDL_Rect{ 0, 0, 0, 0 };
}
float GetContentScale() const { return SDL_GetDisplayContentScale(*this); }
static Display GetForPoint(const SDL_Point* point) { return Display(SDL_GetDisplayForPoint(point)); }
static Display GetForRect(const SDL_Rect* rect) { return Display(SDL_GetDisplayForRect(rect)); }