Browse Source

New feature: support MOUSE_PASSTHROUGH #2516

pull/2521/head
Ray 2 years ago
parent
commit
b549baa6b7
2 changed files with 5 additions and 0 deletions
  1. +1
    -0
      src/raylib.h
  2. +4
    -0
      src/rcore.c

+ 1
- 0
src/raylib.h View File

@ -501,6 +501,7 @@ typedef enum {
FLAG_WINDOW_ALWAYS_RUN = 0x00000100, // Set to allow windows running while minimized
FLAG_WINDOW_TRANSPARENT = 0x00000010, // Set to allow transparent framebuffer
FLAG_WINDOW_HIGHDPI = 0x00002000, // Set to support HighDPI
FLAG_WINDOW_MOUSE_PASSTHROUGH = 0x0002000d, // Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
FLAG_MSAA_4X_HINT = 0x00000020, // Set to try enabling MSAA 4X
FLAG_INTERLACED_HINT = 0x00010000 // Set to try enabling interlaced video format (for V3D)
} ConfigFlags;

+ 4
- 0
src/rcore.c View File

@ -4036,6 +4036,10 @@ static bool InitGraphicsDevice(int width, int height)
#endif
}
else glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE);
// 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)

Loading…
Cancel
Save