Added GetScreenSize function to return screen width & height as a Vector2.

This commit is contained in:
electric-gecko 2024-04-03 22:02:34 -07:00
parent 890058abcd
commit e6e6b04d13
2 changed files with 7 additions and 0 deletions

View File

@ -986,6 +986,7 @@ RLAPI void SetWindowFocused(void); // Set window
RLAPI void *GetWindowHandle(void); // Get native window handle
RLAPI int GetScreenWidth(void); // Get current screen width
RLAPI int GetScreenHeight(void); // Get current screen height
RLAPI Vector2 GetScreenSize(void); // Get current screen width and height as a Vector2
RLAPI int GetRenderWidth(void); // Get current render width (it considers HiDPI)
RLAPI int GetRenderHeight(void); // Get current render height (it considers HiDPI)
RLAPI int GetMonitorCount(void); // Get number of connected monitors

View File

@ -762,6 +762,12 @@ int GetScreenHeight(void)
return CORE.Window.screen.height;
}
// Get current screen width and height as a Vector2
Vector2 GetScreenSize(void)
{
return (Vector2){ (float)CORE.Window.screen.width, (float)CORE.Window.screen.height };
}
// Get current render width which is equal to screen width*dpi scale
int GetRenderWidth(void)
{