1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-07 22:57:25 -04:00

Add attention request to joystick test

This commit is contained in:
Camilla Löwy 2017-05-11 18:29:08 +02:00
parent baa9cd8968
commit 2f5e230338

View File

@ -52,6 +52,7 @@
#define strdup(x) _strdup(x)
#endif
static GLFWwindow* window;
static int joysticks[GLFW_JOYSTICK_LAST + 1];
static int joystick_count = 0;
@ -79,6 +80,9 @@ static void joystick_callback(int jid, int event)
joystick_count--;
}
if (!glfwGetWindowAttrib(window, GLFW_FOCUSED))
glfwRequestWindowAttention(window);
}
static const char* joystick_label(int jid)
@ -91,7 +95,6 @@ static const char* joystick_label(int jid)
int main(void)
{
int jid, hat_buttons = GLFW_FALSE;
GLFWwindow* window;
struct nk_context* nk;
struct nk_font_atlas* atlas;