mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Formatting.
This commit is contained in:
parent
4cb569b5b3
commit
b4d0223faa
@ -178,7 +178,7 @@ int _glfwInitJoysticks(void)
|
|||||||
int i, joy = 0;
|
int i, joy = 0;
|
||||||
regex_t regex;
|
regex_t regex;
|
||||||
DIR* dir;
|
DIR* dir;
|
||||||
const char* directories[] =
|
const char* dirs[] =
|
||||||
{
|
{
|
||||||
"/dev/input",
|
"/dev/input",
|
||||||
"/dev"
|
"/dev"
|
||||||
@ -190,11 +190,11 @@ int _glfwInitJoysticks(void)
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < sizeof(directories) / sizeof(directories[0]); i++)
|
for (i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++)
|
||||||
{
|
{
|
||||||
struct dirent* entry;
|
struct dirent* entry;
|
||||||
|
|
||||||
dir = opendir(directories[i]);
|
dir = opendir(dirs[i]);
|
||||||
if (!dir)
|
if (!dir)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ int _glfwInitJoysticks(void)
|
|||||||
if (regexec(®ex, entry->d_name, 1, &match, 0) != 0)
|
if (regexec(®ex, entry->d_name, 1, &match, 0) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "%s/%s", directories[i], entry->d_name);
|
snprintf(path, sizeof(path), "%s/%s", dirs[i], entry->d_name);
|
||||||
if (openJoystickDevice(joy, path))
|
if (openJoystickDevice(joy, path))
|
||||||
joy++;
|
joy++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user