mirror of
https://github.com/glfw/glfw.git
synced 2024-11-23 05:24:34 +00:00
Formatting.
This commit is contained in:
parent
906754d3d0
commit
b076d858cc
@ -261,10 +261,8 @@ static void updateKeyCodeLUT(void)
|
|||||||
int keyCode;
|
int keyCode;
|
||||||
|
|
||||||
// Clear the LUT
|
// Clear the LUT
|
||||||
for (keyCode = 0; keyCode < 256; ++keyCode)
|
for (keyCode = 0; keyCode < 256; keyCode++)
|
||||||
{
|
|
||||||
_glfwLibrary.X11.keyCodeLUT[keyCode] = -1;
|
_glfwLibrary.X11.keyCodeLUT[keyCode] = -1;
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(_GLFW_HAS_XKB)
|
#if defined(_GLFW_HAS_XKB)
|
||||||
// If the Xkb extension is available, use it to determine physical key
|
// If the Xkb extension is available, use it to determine physical key
|
||||||
@ -272,7 +270,7 @@ static void updateKeyCodeLUT(void)
|
|||||||
if (_glfwLibrary.X11.Xkb.available)
|
if (_glfwLibrary.X11.Xkb.available)
|
||||||
{
|
{
|
||||||
int i, keyCodeGLFW;
|
int i, keyCodeGLFW;
|
||||||
char name[XkbKeyNameLength+1];
|
char name[XkbKeyNameLength + 1];
|
||||||
XkbDescPtr descr;
|
XkbDescPtr descr;
|
||||||
|
|
||||||
// Get keyboard description
|
// Get keyboard description
|
||||||
@ -284,10 +282,9 @@ static void updateKeyCodeLUT(void)
|
|||||||
for (keyCode = descr->min_key_code; keyCode <= descr->max_key_code; ++keyCode)
|
for (keyCode = descr->min_key_code; keyCode <= descr->max_key_code; ++keyCode)
|
||||||
{
|
{
|
||||||
// Get the key name
|
// Get the key name
|
||||||
for (i = 0; i < XkbKeyNameLength; ++i)
|
for (i = 0; i < XkbKeyNameLength; i++)
|
||||||
{
|
|
||||||
name[i] = descr->names->keys[keyCode].name[i];
|
name[i] = descr->names->keys[keyCode].name[i];
|
||||||
}
|
|
||||||
name[XkbKeyNameLength] = 0;
|
name[XkbKeyNameLength] = 0;
|
||||||
|
|
||||||
// Map the key name to a GLFW key code. Note: We only map printable
|
// Map the key name to a GLFW key code. Note: We only map printable
|
||||||
@ -346,9 +343,7 @@ static void updateKeyCodeLUT(void)
|
|||||||
|
|
||||||
// Update the key code LUT
|
// Update the key code LUT
|
||||||
if ((keyCode >= 0) && (keyCode < 256))
|
if ((keyCode >= 0) && (keyCode < 256))
|
||||||
{
|
|
||||||
_glfwLibrary.X11.keyCodeLUT[keyCode] = keyCodeGLFW;
|
_glfwLibrary.X11.keyCodeLUT[keyCode] = keyCodeGLFW;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Free the keyboard description
|
// Free the keyboard description
|
||||||
@ -358,7 +353,7 @@ static void updateKeyCodeLUT(void)
|
|||||||
|
|
||||||
// Translate the un-translated key codes using traditional X11 KeySym
|
// Translate the un-translated key codes using traditional X11 KeySym
|
||||||
// lookups
|
// lookups
|
||||||
for (keyCode = 0; keyCode < 256; ++keyCode)
|
for (keyCode = 0; keyCode < 256; keyCode++)
|
||||||
{
|
{
|
||||||
if (_glfwLibrary.X11.keyCodeLUT[keyCode] < 0)
|
if (_glfwLibrary.X11.keyCodeLUT[keyCode] < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user