ADDED: IsWindowResized()
This commit is contained in:
parent
d7fd6e0f1a
commit
2e99c6cefb
2 changed files with 16 additions and 0 deletions
15
src/core.c
15
src/core.c
|
@ -273,6 +273,7 @@ static GLFWwindow *window; // Native window (graphic device
|
||||||
#endif
|
#endif
|
||||||
static bool windowReady = false; // Check if window has been initialized successfully
|
static bool windowReady = false; // Check if window has been initialized successfully
|
||||||
static bool windowMinimized = false; // Check if window has been minimized
|
static bool windowMinimized = false; // Check if window has been minimized
|
||||||
|
static bool windowResized = false; // Check if window has been resized
|
||||||
static const char *windowTitle = NULL; // Window text title...
|
static const char *windowTitle = NULL; // Window text title...
|
||||||
|
|
||||||
static unsigned int displayWidth, displayHeight;// Display width and height (monitor, device-screen, LCD, ...)
|
static unsigned int displayWidth, displayHeight;// Display width and height (monitor, device-screen, LCD, ...)
|
||||||
|
@ -742,6 +743,16 @@ bool IsWindowMinimized(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if window has been resized
|
||||||
|
bool IsWindowResized(void)
|
||||||
|
{
|
||||||
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP)
|
||||||
|
return windowResized;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Check if window is currently hidden
|
// Check if window is currently hidden
|
||||||
bool IsWindowHidden(void)
|
bool IsWindowHidden(void)
|
||||||
{
|
{
|
||||||
|
@ -3138,6 +3149,8 @@ static void PollInputEvents(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
windowResized = false;
|
||||||
|
|
||||||
#if defined(SUPPORT_EVENTS_WAITING)
|
#if defined(SUPPORT_EVENTS_WAITING)
|
||||||
glfwWaitEvents();
|
glfwWaitEvents();
|
||||||
#else
|
#else
|
||||||
|
@ -3414,6 +3427,8 @@ static void WindowSizeCallback(GLFWwindow *window, int width, int height)
|
||||||
currentHeight = height;
|
currentHeight = height;
|
||||||
|
|
||||||
// NOTE: Postprocessing texture is not scaled to new size
|
// NOTE: Postprocessing texture is not scaled to new size
|
||||||
|
|
||||||
|
windowResized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLFW3 WindowIconify Callback, runs when window is minimized/restored
|
// GLFW3 WindowIconify Callback, runs when window is minimized/restored
|
||||||
|
|
|
@ -865,6 +865,7 @@ RLAPI bool WindowShouldClose(void); // Check if KE
|
||||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||||
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
|
RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus)
|
||||||
|
RLAPI bool IsWindowResized(void); // Check if window has been resized
|
||||||
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
RLAPI bool IsWindowHidden(void); // Check if window is currently hidden
|
||||||
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP)
|
||||||
RLAPI void UnhideWindow(void); // Show the window
|
RLAPI void UnhideWindow(void); // Show the window
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue