mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 03:52:01 +00:00
parent
186d03b32a
commit
bc7ebc1a89
@ -105,14 +105,6 @@ int main(void)
|
|||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
exit(EXIT_FAILURE);
|
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);
|
window = glfwCreateWindow(640, 480, "Joystick Test", NULL, NULL);
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
@ -128,6 +120,14 @@ int main(void)
|
|||||||
nk_glfw3_font_stash_begin(&atlas);
|
nk_glfw3_font_stash_begin(&atlas);
|
||||||
nk_glfw3_font_stash_end();
|
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))
|
while (!glfwWindowShouldClose(window))
|
||||||
{
|
{
|
||||||
int i, width, height;
|
int i, width, height;
|
||||||
|
Loading…
Reference in New Issue
Block a user