Added SetWindowAspectRatio

This commit is contained in:
khhs167 2023-06-10 08:42:05 +02:00
parent 6aada7d5ec
commit 97780c444f
2 changed files with 10 additions and 0 deletions

View File

@ -957,6 +957,7 @@ RLAPI void SetWindowPosition(int x, int y); // Set window
RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) 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 void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
RLAPI void SetWindowSize(int width, int height); // Set window dimensions RLAPI void SetWindowSize(int width, int height); // Set window dimensions
RLAPI void SetWindowAspectRatio(int numerator, int denominator); // Set window aspect ratio (for FLAG_WINDOW_RESIZABLE)
RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP) RLAPI void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
RLAPI void *GetWindowHandle(void); // Get native window handle RLAPI void *GetWindowHandle(void); // Get native window handle
RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenWidth(void); // Get current screen width

View File

@ -1692,6 +1692,15 @@ void SetWindowSize(int width, int height)
#endif #endif
} }
// Set window aspect ratio (for FLAG_WINDOW_RESIZABLE)
void SetWindowAspectRatio(int numerator, int denominator);
{
#if defined(PLATFORM_DESKTOP)
glfwSetWindowAspectRatio(CORE.Window.handle, numerator, denominator);
#endif
}
// Set window opacity, value opacity is between 0.0 and 1.0 // Set window opacity, value opacity is between 0.0 and 1.0
void SetWindowOpacity(float opacity) void SetWindowOpacity(float opacity)
{ {