Add GetWindowSize() function
This commit is contained in:
parent
ac6f889dfc
commit
dce6d5c8cb
|
|
@ -973,6 +973,7 @@ RLAPI int GetMonitorPhysicalWidth(int monitor); // Get specifi
|
||||||
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get specified monitor physical height in millimetres
|
RLAPI int GetMonitorPhysicalHeight(int monitor); // Get specified monitor physical height in millimetres
|
||||||
RLAPI int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
|
RLAPI int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
|
||||||
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
RLAPI Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
||||||
|
RLAPI Vector2 GetWindowSize(void); // Get window size on monitor
|
||||||
RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
|
RLAPI Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
|
||||||
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
|
RLAPI const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
|
||||||
RLAPI void SetClipboardText(const char *text); // Set clipboard text content
|
RLAPI void SetClipboardText(const char *text); // Set clipboard text content
|
||||||
|
|
|
||||||
11
src/rcore.c
11
src/rcore.c
|
|
@ -1972,6 +1972,17 @@ Vector2 GetWindowPosition(void)
|
||||||
return (Vector2){ (float)x, (float)y };
|
return (Vector2){ (float)x, (float)y };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get window size on monitor
|
||||||
|
Vector2 GetWindowSize(void)
|
||||||
|
{
|
||||||
|
int x = 0;
|
||||||
|
int y = 0;
|
||||||
|
#if defined(PLATFORM_DESKTOP)
|
||||||
|
glfwGetWindowSize(CORE.Window.handle, &x, &y);
|
||||||
|
#endif
|
||||||
|
return (Vector2){ (float)x, (float)y };
|
||||||
|
}
|
||||||
|
|
||||||
// Get window scale DPI factor for current monitor
|
// Get window scale DPI factor for current monitor
|
||||||
Vector2 GetWindowScaleDPI(void)
|
Vector2 GetWindowScaleDPI(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user