Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/raylib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down