summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorRay <[email protected]>2017-05-03 01:20:08 +0200
committerGitHub <[email protected]>2017-05-03 01:20:08 +0200
commit33069cddc5be50f499f48a1a93619a9e94fcf87f (patch)
tree1ec16898ae078540456cf8eb74d1a8986b4564f0 /src/core.c
parentd593bd0081ea2dcafe3182ffc874882b5b7110b4 (diff)
parente197665e1dc3ec895b14b901884fee058dc1b4e9 (diff)
downloadraylib-33069cddc5be50f499f48a1a93619a9e94fcf87f.tar.gz
raylib-33069cddc5be50f499f48a1a93619a9e94fcf87f.zip
Merge pull request #275 from victorfisac/develop
Added function to set window minimum dimensions
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 1bad2369..d7cf1f79 100644
--- a/src/core.c
+++ b/src/core.c
@@ -629,6 +629,15 @@ void SetWindowMonitor(int monitor)
#endif
}
+// Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
+void SetWindowMinSize(int width, int height)
+{
+#if defined(PLATFORM_DESKTOP)
+ const GLFWvidmode *mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
+ glfwSetWindowSizeLimits(window, width, height, mode->width, mode->height);
+#endif
+}
+
// Get current screen width
int GetScreenWidth(void)
{