summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2017-05-03 14:17:25 +0200
committerRay <[email protected]>2017-05-03 14:17:25 +0200
commit9c66d961d0cab7627a5345089152e7beeb860de7 (patch)
tree82eaf9766134dac918c31852a20f8e8c8c9e2fc2 /src
parent2d5c8e61b1d34b9b482b807f5bef555f532533fd (diff)
parent33069cddc5be50f499f48a1a93619a9e94fcf87f (diff)
downloadraylib-9c66d961d0cab7627a5345089152e7beeb860de7.tar.gz
raylib-9c66d961d0cab7627a5345089152e7beeb860de7.zip
Merge branch 'develop' of https://github.com/raysan5/raylib into develop
Diffstat (limited to 'src')
-rw-r--r--src/core.c9
-rw-r--r--src/raylib.h1
2 files changed, 10 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)
{
diff --git a/src/raylib.h b/src/raylib.h
index 6f510f9f..3107661f 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -667,6 +667,7 @@ RLAPI void ToggleFullscreen(void); // Fullscreen
RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
+RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
RLAPI int GetScreenWidth(void); // Get current screen width
RLAPI int GetScreenHeight(void); // Get current screen height