summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2023-12-03 20:06:34 +0100
committerRay <[email protected]>2023-12-03 20:06:34 +0100
commit5aa84a34ea9e39528e830baea230f8efd9dc8883 (patch)
tree9c2ef1a1b984e316c7f861c18ecb7abd3003819d /src
parent4ae2af0bccc2792e0f380152b8638bfa384595c6 (diff)
downloadraylib-5aa84a34ea9e39528e830baea230f8efd9dc8883.tar.gz
raylib-5aa84a34ea9e39528e830baea230f8efd9dc8883.zip
Revert "Fix warning while using external GLFW older than version 3.4.0 (#3599)"
This reverts commit f1b0d15813098228369dd647ffc04a7dbd92c02a.
Diffstat (limited to 'src')
-rw-r--r--src/platforms/rcore_desktop.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c
index e3103291..0aca7313 100644
--- a/src/platforms/rcore_desktop.c
+++ b/src/platforms/rcore_desktop.c
@@ -88,6 +88,11 @@
//----------------------------------------------------------------------------------
// Defines and Macros
//----------------------------------------------------------------------------------
+// TODO: HACK: Added flag if not provided by GLFW when using external library
+// Latest GLFW release (GLFW 3.3.8) does not implement this flag, it was added for 3.4.0-dev
+#if !defined(GLFW_MOUSE_PASSTHROUGH)
+ #define GLFW_MOUSE_PASSTHROUGH 0x0002000D
+#endif
//----------------------------------------------------------------------------------
// Types and Structures Definition
@@ -391,13 +396,11 @@ void SetWindowState(unsigned int flags)
}
// State change: FLAG_WINDOW_MOUSE_PASSTHROUGH
-#if defined (GLFW_MOUSE_PASSTHROUGH)
if (((CORE.Window.flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) != (flags & FLAG_WINDOW_MOUSE_PASSTHROUGH)) && ((flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0))
{
glfwSetWindowAttrib(platform.handle, GLFW_MOUSE_PASSTHROUGH, GLFW_TRUE);
CORE.Window.flags |= FLAG_WINDOW_MOUSE_PASSTHROUGH;
}
-#endif
// State change: FLAG_MSAA_4X_HINT
if (((CORE.Window.flags & FLAG_MSAA_4X_HINT) != (flags & FLAG_MSAA_4X_HINT)) && ((flags & FLAG_MSAA_4X_HINT) > 0))
@@ -506,13 +509,11 @@ void ClearWindowState(unsigned int flags)
}
// State change: FLAG_WINDOW_MOUSE_PASSTHROUGH
-#if defined (GLFW_MOUSE_PASSTHROUGH)
if (((CORE.Window.flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0) && ((flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0))
{
glfwSetWindowAttrib(platform.handle, GLFW_MOUSE_PASSTHROUGH, GLFW_FALSE);
CORE.Window.flags &= ~FLAG_WINDOW_MOUSE_PASSTHROUGH;
}
-#endif
// State change: FLAG_MSAA_4X_HINT
if (((CORE.Window.flags & FLAG_MSAA_4X_HINT) > 0) && ((flags & FLAG_MSAA_4X_HINT) > 0))
@@ -1315,10 +1316,8 @@ int InitPlatform(void)
else glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE);
// Mouse passthrough
-#if defined (GLFW_MOUSE_PASSTHROUGH)
if ((CORE.Window.flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0) glfwWindowHint(GLFW_MOUSE_PASSTHROUGH, GLFW_TRUE);
else glfwWindowHint(GLFW_MOUSE_PASSTHROUGH, GLFW_FALSE);
-#endif
if (CORE.Window.flags & FLAG_MSAA_4X_HINT)
{