Removed bad use of glfwGetCurrentContext.
diff --git a/tests/joysticks.c b/tests/joysticks.c
index c1abb5f..9b03a3b 100644
--- a/tests/joysticks.c
+++ b/tests/joysticks.c
@@ -94,11 +94,11 @@
     }
 }
 
-static void draw_joysticks(void)
+static void draw_joysticks(GLFWwindow window)
 {
     int i, width, height;
 
-    glfwGetWindowSize(glfwGetCurrentContext(), &width, &height);
+    glfwGetWindowSize(window, &width, &height);
 
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
@@ -205,7 +205,7 @@
         glClear(GL_COLOR_BUFFER_BIT);
 
         refresh_joysticks();
-        draw_joysticks();
+        draw_joysticks(window);
 
         glfwSwapBuffers(window);
         glfwPollEvents();