mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-04 05:09:17 -05:00
REVIEWED: WindowSizeCallback(), GLFW
It is called on window minification and setting internal width/height to 0, that can break things
This commit is contained in:
@ -1752,6 +1752,10 @@ static void ErrorCallback(int error, const char *description)
|
|||||||
// NOTE: Window resizing not enabled by default, use SetConfigFlags()
|
// NOTE: Window resizing not enabled by default, use SetConfigFlags()
|
||||||
static void WindowSizeCallback(GLFWwindow *window, int width, int height)
|
static void WindowSizeCallback(GLFWwindow *window, int width, int height)
|
||||||
{
|
{
|
||||||
|
// WARNING: On window minimization, callback is called,
|
||||||
|
// but we don't want to change internal screen values, it breaks things
|
||||||
|
if ((width == 0) || (height == 0)) return;
|
||||||
|
|
||||||
// Reset viewport and projection matrix for new size
|
// Reset viewport and projection matrix for new size
|
||||||
SetupViewport(width, height);
|
SetupViewport(width, height);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user