浏览代码

Fix function return value when uninitialized

Camilla Löwy 1 年之前
父节点
当前提交
d7aeb1eae8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/window.c

+ 1 - 1
src/window.c

@@ -740,7 +740,7 @@ GLFWAPI float glfwGetWindowOpacity(GLFWwindow* handle)
     _GLFWwindow* window = (_GLFWwindow*) handle;
     assert(window != NULL);
 
-    _GLFW_REQUIRE_INIT_OR_RETURN(1.f);
+    _GLFW_REQUIRE_INIT_OR_RETURN(0.f);
     return _glfw.platform.getWindowOpacity(window);
 }