[rcore] add GetDisplayWidth() and GetDisplayHeight()

This commit is contained in:
keks137 2025-09-16 23:37:48 +02:00
parent fbdf5e4fd2
commit ace5d857f4
2 changed files with 14 additions and 0 deletions

View File

@ -999,6 +999,8 @@ RLAPI void SetWindowSize(int width, int height); // Set window
RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f]
RLAPI void SetWindowFocused(void); // Set window focused
RLAPI void *GetWindowHandle(void); // Get native window handle
RLAPI int GetDisplayWidth(void); // Get display width
RLAPI int GetDisplayHeight(void); // Get display height
RLAPI int GetScreenWidth(void); // Get current screen width
RLAPI int GetScreenHeight(void); // Get current screen height
RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI)

View File

@ -819,6 +819,18 @@ bool IsWindowState(unsigned int flag)
return ((CORE.Window.flags & flag) > 0);
}
// Get display width
int GetDisplayWidth(void)
{
return CORE.Window.display.width;
}
// Get display height
int GetDisplayHeight(void)
{
return CORE.Window.display.height;
}
// Get current screen width
int GetScreenWidth(void)
{