mirror of
https://github.com/glfw/glfw.git
synced 2025-12-21 06:31:58 +00:00
Compare commits
5 Commits
0e45a6c03b
...
d4ef02066d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4ef02066d | ||
|
|
768e81a0eb | ||
|
|
5115508d2c | ||
|
|
dca02a988b | ||
|
|
be0d9e8a56 |
@ -68,6 +68,7 @@ video tutorials.
|
||||
- Jan Ekström
|
||||
- Siavash Eliasi
|
||||
- er-azh
|
||||
- Jan Hendrik Farr
|
||||
- Ahmad Fatoum
|
||||
- Nikita Fediuchin
|
||||
- Felipe Ferreira
|
||||
@ -98,6 +99,7 @@ video tutorials.
|
||||
- Björn Hempel
|
||||
- Matthew Henry
|
||||
- heromyth
|
||||
- Jochen Heizmann
|
||||
- Lucas Hinderberger
|
||||
- Paul Holden
|
||||
- Hajime Hoshi
|
||||
|
||||
@ -138,11 +138,13 @@ information on what to include when reporting a bug.
|
||||
- [Wayland] Bugfix: Retrieved cursor position would be incorrect when hovering over
|
||||
fallback decorations
|
||||
- [Wayland] Bugfix: Fallback decorations would report scroll events
|
||||
- [Wayland] Bugfix: Keyboard repeat events halted when any key is released (#2568)
|
||||
- [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
|
||||
- [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
|
||||
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
||||
- [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to
|
||||
`GLFW_NATIVE_CONTEXT_API` (#2518)
|
||||
- [Linux] Bugfix: Non-joystick input devices were incorrectly detected as joysticks on Raspberry PI OS
|
||||
|
||||
|
||||
## Contact
|
||||
|
||||
@ -157,10 +157,19 @@ static GLFWbool openJoystickDevice(const char* path)
|
||||
}
|
||||
|
||||
// Ensure this device supports the events expected of a joystick
|
||||
if (!isBitSet(EV_ABS, evBits))
|
||||
// NOTE: SDL2 based Joystick Check
|
||||
if (isBitSet(BTN_STYLUS, keyBits) ||
|
||||
isBitSet(BTN_TOOL_PEN, keyBits) ||
|
||||
isBitSet(BTN_TOOL_FINGER, keyBits) ||
|
||||
isBitSet(BTN_MOUSE, keyBits) ||
|
||||
isBitSet(BTN_TOUCH, keyBits) ||
|
||||
(keyBits[0] & 0xFFFFFFFE) != 0)
|
||||
{
|
||||
close(linjs.fd);
|
||||
return GLFW_FALSE;
|
||||
} else if (!isBitSet(EV_ABS, evBits)) {
|
||||
close(linjs.fd);
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
char name[256] = "";
|
||||
@ -168,6 +177,17 @@ static GLFWbool openJoystickDevice(const char* path)
|
||||
if (ioctl(linjs.fd, EVIOCGNAME(sizeof(name)), name) < 0)
|
||||
strncpy(name, "Unknown", sizeof(name));
|
||||
|
||||
// NOTE: Some devices are still indentified as Gamepad devices (Rapsbery PI 500, Hypertouch Square Display).
|
||||
// They are filtered out for enumeration. I wish there is a more robust way to detect if a device is really
|
||||
// a gamecontroller/gamepad, but I wasn't able to find a way.
|
||||
if (strstr(name, "Keyboard System Control") ||
|
||||
strstr(name, "Keyboard Consumer Control") ||
|
||||
strstr(name, "11-0048 EP0110M09") ||
|
||||
strstr(name, "HID 046a:0023")) {
|
||||
close(linjs.fd);
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
char guid[33] = "";
|
||||
|
||||
// Generate a joystick GUID that matches the SDL 2.0.5+ one
|
||||
@ -433,4 +453,3 @@ void _glfwUpdateGamepadGUIDLinux(char* guid)
|
||||
}
|
||||
|
||||
#endif // GLFW_BUILD_LINUX_JOYSTICK
|
||||
|
||||
|
||||
@ -1838,10 +1838,11 @@ static void keyboardHandleKey(void* userData,
|
||||
|
||||
timer.it_value.tv_sec = _glfw.wl.keyRepeatDelay / 1000;
|
||||
timer.it_value.tv_nsec = (_glfw.wl.keyRepeatDelay % 1000) * 1000000;
|
||||
}
|
||||
}
|
||||
|
||||
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
|
||||
}
|
||||
} else if (scancode == _glfw.wl.keyRepeatScancode) {
|
||||
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
|
||||
}
|
||||
|
||||
_glfwInputKey(window, key, scancode, action, _glfw.wl.xkb.modifiers);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user