浏览代码

[rcore][glfw] fix `IsWindowFocused()` inverted logic (#5333)

pull/5337/head
JohnnyCena123 3 个月前
committed by GitHub
父节点
当前提交
12ce106661
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/platforms/rcore_desktop_glfw.c

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

@ -1863,8 +1863,8 @@ static void WindowMaximizeCallback(GLFWwindow *window, int maximized)
// GLFW3 WindowFocus Callback, runs when window get/lose focus
static void WindowFocusCallback(GLFWwindow *window, int focused)
{
if (focused) FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was focused
else FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window lost focus
if (focused) FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was focused
else FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window lost focus
}
// GLFW3 Window Drop Callback, runs when drop files into window

正在加载...
取消
保存