Browse Source

Fix function return value when uninitialized

Camilla Löwy 1 năm trước cách đây
mục cha
commit
d7aeb1eae8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/window.c

+ 1 - 1
src/window.c

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