mirror of
https://github.com/glfw/glfw.git
synced 2025-12-19 21:51:56 +00:00
Compare commits
6 Commits
ee0645fbb5
...
d8d1312900
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8d1312900 | ||
|
|
506c11ba43 | ||
|
|
d30d63313c | ||
|
|
b740977758 | ||
|
|
7cd1ca7f88 | ||
|
|
e1925753fa |
@ -229,7 +229,7 @@ video tutorials.
|
|||||||
- Brandon Schaefer
|
- Brandon Schaefer
|
||||||
- Sebastian Schuberth
|
- Sebastian Schuberth
|
||||||
- Scr3amer
|
- Scr3amer
|
||||||
- Jan Schuerkamp
|
- Jan Schürkamp
|
||||||
- Christian Sdunek
|
- Christian Sdunek
|
||||||
- Matt Sealey
|
- Matt Sealey
|
||||||
- Steve Sexton
|
- Steve Sexton
|
||||||
@ -295,6 +295,7 @@ video tutorials.
|
|||||||
- Jonas Ådahl
|
- Jonas Ådahl
|
||||||
- Lasse Öörni
|
- Lasse Öörni
|
||||||
- Leonard König
|
- Leonard König
|
||||||
|
- Smbat Senpie Voskanyan
|
||||||
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
||||||
reports, patches, feedback, testing and encouragement
|
reports, patches, feedback, testing and encouragement
|
||||||
|
|
||||||
|
|||||||
@ -129,12 +129,14 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Bugfix: The fractional scaling related objects were not destroyed
|
- [Wayland] Bugfix: The fractional scaling related objects were not destroyed
|
||||||
- [Wayland] Bugfix: `glfwInit` would segfault on compositor with no seat (#2517)
|
- [Wayland] Bugfix: `glfwInit` would segfault on compositor with no seat (#2517)
|
||||||
- [Wayland] Bugfix: A drag entering a non-GLFW surface could cause a segfault
|
- [Wayland] Bugfix: A drag entering a non-GLFW surface could cause a segfault
|
||||||
|
- [Wayland] Bugfix: Ignore key repeat events when no window has keyboard focus (#2727)
|
||||||
- [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
|
- [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 Vulkan 'window' surface creation via `VK_EXT_headless_surface`
|
||||||
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
- [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
|
- [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to
|
||||||
`GLFW_NATIVE_CONTEXT_API` (#2518)
|
`GLFW_NATIVE_CONTEXT_API` (#2518)
|
||||||
|
- Added `GLFW_GAMEPAD_BUTTON_MISC1` and `GLFW_GAMEPAD_BUTTON_TOUCHPAD` to the
|
||||||
|
gamepad_buttons button group
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
|
|||||||
5
deps/nuklear.h
vendored
5
deps/nuklear.h
vendored
@ -423,6 +423,11 @@ NK_STATIC_ASSERT(sizeof(nk_rune) >= 4);
|
|||||||
NK_STATIC_ASSERT(sizeof(nk_size) >= sizeof(void*));
|
NK_STATIC_ASSERT(sizeof(nk_size) >= sizeof(void*));
|
||||||
NK_STATIC_ASSERT(sizeof(nk_ptr) >= sizeof(void*));
|
NK_STATIC_ASSERT(sizeof(nk_ptr) >= sizeof(void*));
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
/* disable `operands are different enum types` warning on MSVC */
|
||||||
|
#pragma warning( disable: 5287 )
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ============================================================================
|
/* ============================================================================
|
||||||
*
|
*
|
||||||
* API
|
* API
|
||||||
|
|||||||
@ -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
|
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.
|
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
|
`dpright`, `dpdown`, `dpleft`, `leftshoulder`, `rightshoulder`, `leftstick` and
|
||||||
`rightstick`.
|
`rightstick`.
|
||||||
|
|
||||||
|
|||||||
@ -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
|
@ref GLFW_UNLIMITED_MOUSE_BUTTONS input mode needs to be set to make use of
|
||||||
this.
|
this.
|
||||||
|
|
||||||
|
### Gamepad misc1 and touchpad buttons
|
||||||
|
|
||||||
|
GLFW gamepad support improved to include mapping for misc1 and touchpad buttons.
|
||||||
|
|
||||||
## Caveats {#caveats}
|
## Caveats {#caveats}
|
||||||
|
|
||||||
## Deprecations {#deprecations}
|
## Deprecations {#deprecations}
|
||||||
|
|||||||
@ -628,10 +628,12 @@ extern "C" {
|
|||||||
#define GLFW_GAMEPAD_BUTTON_GUIDE 8
|
#define GLFW_GAMEPAD_BUTTON_GUIDE 8
|
||||||
#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9
|
#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB 9
|
||||||
#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10
|
#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB 10
|
||||||
#define GLFW_GAMEPAD_BUTTON_DPAD_UP 11
|
#define GLFW_GAMEPAD_BUTTON_MISC1 11
|
||||||
#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT 12
|
#define GLFW_GAMEPAD_BUTTON_TOUCHPAD 12
|
||||||
#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN 13
|
#define GLFW_GAMEPAD_BUTTON_DPAD_UP 13
|
||||||
#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT 14
|
#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_LAST GLFW_GAMEPAD_BUTTON_DPAD_LEFT
|
||||||
|
|
||||||
#define GLFW_GAMEPAD_BUTTON_CROSS GLFW_GAMEPAD_BUTTON_A
|
#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`
|
/*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS`
|
||||||
* or `GLFW_RELEASE`.
|
* 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
|
/*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0
|
||||||
* to 1.0 inclusive.
|
* to 1.0 inclusive.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -144,6 +144,8 @@ static GLFWbool parseMapping(_GLFWmapping* mapping, const char* string)
|
|||||||
{ "rightshoulder", mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER },
|
{ "rightshoulder", mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER },
|
||||||
{ "leftstick", mapping->buttons + GLFW_GAMEPAD_BUTTON_LEFT_THUMB },
|
{ "leftstick", mapping->buttons + GLFW_GAMEPAD_BUTTON_LEFT_THUMB },
|
||||||
{ "rightstick", mapping->buttons + GLFW_GAMEPAD_BUTTON_RIGHT_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 },
|
{ "dpup", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_UP },
|
||||||
{ "dpright", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_RIGHT },
|
{ "dpright", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_RIGHT },
|
||||||
{ "dpdown", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_DOWN },
|
{ "dpdown", mapping->buttons + GLFW_GAMEPAD_BUTTON_DPAD_DOWN },
|
||||||
|
|||||||
@ -636,7 +636,7 @@ struct _GLFWmapping
|
|||||||
{
|
{
|
||||||
char name[128];
|
char name[128];
|
||||||
char guid[33];
|
char guid[33];
|
||||||
_GLFWmapelement buttons[15];
|
_GLFWmapelement buttons[17];
|
||||||
_GLFWmapelement axes[6];
|
_GLFWmapelement axes[6];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
2039
src/mappings.h
2039
src/mappings.h
File diff suppressed because it is too large
Load Diff
@ -1267,17 +1267,21 @@ static void handleEvents(double* timeout)
|
|||||||
|
|
||||||
if (read(_glfw.wl.keyRepeatTimerfd, &repeats, sizeof(repeats)) == 8)
|
if (read(_glfw.wl.keyRepeatTimerfd, &repeats, sizeof(repeats)) == 8)
|
||||||
{
|
{
|
||||||
for (uint64_t i = 0; i < repeats; i++)
|
if(_glfw.wl.keyboardFocus)
|
||||||
{
|
{
|
||||||
_glfwInputKey(_glfw.wl.keyboardFocus,
|
for (uint64_t i = 0; i < repeats; i++)
|
||||||
translateKey(_glfw.wl.keyRepeatScancode),
|
{
|
||||||
_glfw.wl.keyRepeatScancode,
|
_glfwInputKey(_glfw.wl.keyboardFocus,
|
||||||
GLFW_PRESS,
|
translateKey(_glfw.wl.keyRepeatScancode),
|
||||||
_glfw.wl.xkb.modifiers);
|
_glfw.wl.keyRepeatScancode,
|
||||||
inputText(_glfw.wl.keyboardFocus, _glfw.wl.keyRepeatScancode);
|
GLFW_PRESS,
|
||||||
|
_glfw.wl.xkb.modifiers);
|
||||||
|
inputText(_glfw.wl.keyboardFocus, _glfw.wl.keyRepeatScancode);
|
||||||
|
}
|
||||||
|
|
||||||
|
event = GLFW_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
event = GLFW_TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -299,6 +299,7 @@ int main(void)
|
|||||||
"LB", "RB",
|
"LB", "RB",
|
||||||
"Back", "Start", "Guide",
|
"Back", "Start", "Guide",
|
||||||
"LT", "RT",
|
"LT", "RT",
|
||||||
|
"MISC1", "TOUCHPAD"
|
||||||
};
|
};
|
||||||
|
|
||||||
nk_labelf(nk, NK_TEXT_LEFT,
|
nk_labelf(nk, NK_TEXT_LEFT,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user