diff options
| author | Ray <[email protected]> | 2019-09-10 12:43:44 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-09-10 12:43:44 +0200 |
| commit | 0a2177b4bc387951e69a2259f3cd78714d18de38 (patch) | |
| tree | 67fd304bcfacda08f1e13d4d60aa4c4a9b757669 /src/core.c | |
| parent | ae2452d280a07952529ea82bcc2288d73bc3ccdf (diff) | |
| download | raylib-0a2177b4bc387951e69a2259f3cd78714d18de38.tar.gz raylib-0a2177b4bc387951e69a2259f3cd78714d18de38.zip | |
ADDED: GetWindowPosition()
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1064,6 +1064,17 @@ int GetMonitorPhysicalHeight(int monitor) return 0; } +// Get window position XY on monitor +Vector2 GetWindowPosition(void) +{ + int x = 0; + int y = 0; +#if defined(PLATFORM_DESKTOP) + glfwGetWindowPos(window, &x, &y); +#endif + return (Vector2){ (float)x, (float)y }; +} + // Get the human-readable, UTF-8 encoded name of the primary monitor const char *GetMonitorName(int monitor) { |
