From f5c9265d1b5dd1ca2a9f1fdafeb2e52033685fd4 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 2 Feb 2015 20:08:30 +0100 Subject: [PATCH] Fixed test joystick drawing leaving holes. Fixes #437. --- tests/joysticks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/joysticks.c b/tests/joysticks.c index a3a5cd7e..0d6b2c3a 100644 --- a/tests/joysticks.c +++ b/tests/joysticks.c @@ -110,7 +110,7 @@ static void draw_joystick(Joystick* j, int x, int y, int width, int height) static void draw_joysticks(GLFWwindow* window) { - int i, width, height; + int i, width, height, offset = 0; glfwGetFramebufferSize(window, &width, &height); @@ -126,8 +126,9 @@ static void draw_joysticks(GLFWwindow* window) if (j->present) { draw_joystick(j, - 0, i * height / joystick_count, + 0, offset * height / joystick_count, width, height / joystick_count); + offset++; } } }