浏览代码

Use glfwSetWindowMonitor instead of Pos and Size GLFW functions

pull/5383/head
XenoMustache 2 个月前
父节点
当前提交
2b1d88cb98
共有 1 个文件被更改,包括 12 次插入2 次删除
  1. +12
    -2
      src/platforms/rcore_desktop_glfw.c

+ 12
- 2
src/platforms/rcore_desktop_glfw.c 查看文件

@ -265,8 +265,18 @@ void ToggleBorderlessWindowed(void)
const int monitorHeight = mode->height;
// Set screen position and size
glfwSetWindowPos(platform.handle, monitorPosX, monitorPosY);
glfwSetWindowSize(platform.handle, monitorWidth, monitorHeight);
glfwSetWindowMonitor(
platform.handle,
monitors[monitor],
monitorPosX,
monitorPosY,
monitorWidth,
monitorHeight,
mode->refreshRate
);
// glfwSetWindowPos(platform.handle, monitorPosX, monitorPosY);
// glfwSetWindowSize(platform.handle, monitorWidth, monitorHeight);
// Refocus window
glfwFocusWindow(platform.handle);

正在加载...
取消
保存