浏览代码

REVIEWED: `WindowSizeCallback()`, GLFW

It is called on window minification and setting internal width/height to 0, that can break things
pull/4941/head
Ray 2 周前
父节点
当前提交
8c99a508c6
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      src/platforms/rcore_desktop_glfw.c

+ 4
- 0
src/platforms/rcore_desktop_glfw.c 查看文件

@ -1752,6 +1752,10 @@ static void ErrorCallback(int error, const char *description)
// NOTE: Window resizing not enabled by default, use SetConfigFlags()
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
SetupViewport(width, height);

正在加载...
取消
保存