mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 10:05:10 +00:00
parent
186d03b32a
commit
bc7ebc1a89
@ -105,14 +105,6 @@ int main(void)
|
||||
if (!glfwInit())
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
for (jid = GLFW_JOYSTICK_1; jid <= GLFW_JOYSTICK_LAST; jid++)
|
||||
{
|
||||
if (glfwJoystickPresent(jid))
|
||||
joystick_callback(jid, GLFW_CONNECTED);
|
||||
}
|
||||
|
||||
glfwSetJoystickCallback(joystick_callback);
|
||||
|
||||
window = glfwCreateWindow(640, 480, "Joystick Test", NULL, NULL);
|
||||
if (!window)
|
||||
{
|
||||
@ -128,6 +120,14 @@ int main(void)
|
||||
nk_glfw3_font_stash_begin(&atlas);
|
||||
nk_glfw3_font_stash_end();
|
||||
|
||||
for (jid = GLFW_JOYSTICK_1; jid <= GLFW_JOYSTICK_LAST; jid++)
|
||||
{
|
||||
if (glfwJoystickPresent(jid))
|
||||
joysticks[joystick_count++] = jid;
|
||||
}
|
||||
|
||||
glfwSetJoystickCallback(joystick_callback);
|
||||
|
||||
while (!glfwWindowShouldClose(window))
|
||||
{
|
||||
int i, width, height;
|
||||
|
Loading…
Reference in New Issue
Block a user