1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Removed bad use of glfwGetCurrentContext.

This commit is contained in:
Camilla Berglund 2012-12-02 16:45:03 +01:00
parent 8e5b2239d3
commit 7be9e87ef1

View File

@ -94,11 +94,11 @@ static void draw_joystick(Joystick* j, int x, int y, int width, int height)
} }
} }
static void draw_joysticks(void) static void draw_joysticks(GLFWwindow window)
{ {
int i, width, height; int i, width, height;
glfwGetWindowSize(glfwGetCurrentContext(), &width, &height); glfwGetWindowSize(window, &width, &height);
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glLoadIdentity(); glLoadIdentity();
@ -205,7 +205,7 @@ int main(void)
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
refresh_joysticks(); refresh_joysticks();
draw_joysticks(); draw_joysticks(window);
glfwSwapBuffers(window); glfwSwapBuffers(window);
glfwPollEvents(); glfwPollEvents();