Compare commits

...

5 Commits

Author SHA1 Message Date
SenPie
8dfb407de6
Merge b740977758 into 768e81a0eb 2025-08-14 15:47:58 +02:00
Jan Hendrik Farr
768e81a0eb Wayland: Fix key repeat halting
Key repeat shoud only be halted when the repeating key
is released, not when another key is released.
2025-08-14 15:35:04 +02:00
SenPie
b740977758 Update markdown/log entires affected by PR changes 2024-12-18 20:47:12 +04:00
SenPie
7cd1ca7f88 Add gamepad level support for misc1 and touchpad buttons 2024-12-18 20:25:51 +04:00
SenPie
e1925753fa Update input mappings from SDD_GameControllerDB 2024-12-18 20:25:02 +04:00
10 changed files with 1464 additions and 609 deletions

View File

@ -68,6 +68,7 @@ video tutorials.
- Jan Ekström
- Siavash Eliasi
- er-azh
- Jan Hendrik Farr
- Ahmad Fatoum
- Nikita Fediuchin
- Felipe Ferreira
@ -295,6 +296,7 @@ video tutorials.
- Jonas Ådahl
- Lasse Öörni
- Leonard König
- Smbat Senpie Voskanyan
- All the unmentioned and anonymous contributors in the GLFW community, for bug
reports, patches, feedback, testing and encouragement

View File

@ -138,12 +138,14 @@ 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)
- Added `GLFW_GAMEPAD_BUTTON_MISC1` and `GLFW_GAMEPAD_BUTTON_TOUCHPAD` to the
gamepad_buttons button group
## Contact

View File

@ -869,7 +869,7 @@ The second value is always the human-readable name of the gamepad.
All subsequent values are in the form `<field>:<value>` and describe the layout
of the mapping. These fields may not all be present and may occur in any order.
The button fields are `a`, `b`, `x`, `y`, `back`, `start`, `guide`, `dpup`,
The button fields are `a`, `b`, `x`, `y`, `back`, `start`, `misc1`, `touchpad`, `guide`, `dpup`,
`dpright`, `dpdown`, `dpleft`, `leftshoulder`, `rightshoulder`, `leftstick` and
`rightstick`.

View File

@ -14,6 +14,10 @@ values over 8. For compatibility with older versions, the
@ref GLFW_UNLIMITED_MOUSE_BUTTONS input mode needs to be set to make use of
this.
### Gamepad misc1 and touchpad buttons
GLFW gamepad support improved to include mapping for misc1 and touchpad buttons.
## Caveats {#caveats}
## Deprecations {#deprecations}

View File

@ -628,10 +628,12 @@ extern "C" {
#define GLFW_GAMEPAD_BUTTON_GUIDE 8
#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9
#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10
#define GLFW_GAMEPAD_BUTTON_DPAD_UP 11
#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 12
#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 13
#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 14
#define GLFW_GAMEPAD_BUTTON_MISC1 11
#define GLFW_GAMEPAD_BUTTON_TOUCHPAD 12
#define GLFW_GAMEPAD_BUTTON_DPAD_UP 13
#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 14
#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 15
#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 16
#define GLFW_GAMEPAD_BUTTON_LAST GLFW_GAMEPAD_BUTTON_DPAD_LEFT
#define GLFW_GAMEPAD_BUTTON_CROSS GLFW_GAMEPAD_BUTTON_A
@ -2116,7 +2118,7 @@ typedef struct GLFWgamepadstate
/*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`
* or `GLFW_RELEASE`.
*/
unsigned char buttons[15];
unsigned char buttons[17];
/*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0
* to 1.0 inclusive.
*/

View File

@ -144,6 +144,8 @@ static GLFWbool parseMapping(_GLFWmapping* mapping, const char* string)
{ "rightshoulder", mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER },
{ "leftstick", mapping->buttons + GLFW_GAMEPAD_BUTTON_LEFT_THUMB },
{ "rightstick", mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_THUMB },
{ "misc1", mapping->buttons + GLFW_GAMEPAD_BUTTON_MISC1 },
{ "touchpad", mapping->buttons + GLFW_GAMEPAD_BUTTON_TOUCHPAD },
{ "dpup", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_UP },
{ "dpright", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_RIGHT },
{ "dpdown", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_DOWN },

View File

@ -636,7 +636,7 @@ struct _GLFWmapping
{
char name[128];
char guid[33];
_GLFWmapelement buttons[15];
_GLFWmapelement buttons[17];
_GLFWmapelement axes[6];
};

File diff suppressed because it is too large Load Diff

View File

@ -1838,11 +1838,12 @@ 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);
}
timerfd_settime(_glfw.wl.keyRepeatTimerfd, 0, &timer, NULL);
_glfwInputKey(window, key, scancode, action, _glfw.wl.xkb.modifiers);
if (action == GLFW_PRESS)

View File

@ -299,6 +299,7 @@ int main(void)
"LB", "RB",
"Back", "Start", "Guide",
"LT", "RT",
"MISC1", "TOUCHPAD"
};
nk_labelf(nk, NK_TEXT_LEFT,