testgamecontroller: fix -Wshadow warning by renaming global axis+button textures
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index 93942b1..6827884 100644
--- a/test/testgamecontroller.c
+++ b/test/testgamecontroller.c
@@ -86,7 +86,7 @@ static SDL_bool retval = SDL_FALSE;
static SDL_bool done = SDL_FALSE;
static SDL_bool set_LED = SDL_FALSE;
static int trigger_effect = 0;
-static SDL_Texture *background_front, *background_back, *button, *axis;
+static SDL_Texture *background_front, *background_back, *button_texture, *axis_texture;
static SDL_GameController *gamecontroller;
static SDL_GameController **gamecontrollers;
static int num_controllers = 0;
@@ -696,7 +696,7 @@ loop(void *arg)
dst.y = button_positions[i].y;
dst.w = BUTTON_SIZE;
dst.h = BUTTON_SIZE;
- SDL_RenderCopyEx(screen, button, NULL, &dst, 0, NULL, SDL_FLIP_NONE);
+ SDL_RenderCopyEx(screen, button_texture, NULL, &dst, 0, NULL, SDL_FLIP_NONE);
}
}
}
@@ -712,7 +712,7 @@ loop(void *arg)
dst.y = axis_positions[i].y;
dst.w = AXIS_SIZE;
dst.h = AXIS_SIZE;
- SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
+ SDL_RenderCopyEx(screen, axis_texture, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
} else if (value > deadzone) {
const double angle = axis_positions[i].angle + 180.0;
SDL_Rect dst;
@@ -720,7 +720,7 @@ loop(void *arg)
dst.y = axis_positions[i].y;
dst.w = AXIS_SIZE;
dst.h = AXIS_SIZE;
- SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
+ SDL_RenderCopyEx(screen, axis_texture, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
}
}
}
@@ -910,16 +910,16 @@ main(int argc, char *argv[])
background_front = LoadTexture(screen, "controllermap.bmp", SDL_FALSE, NULL, NULL);
background_back = LoadTexture(screen, "controllermap_back.bmp", SDL_FALSE, NULL, NULL);
- button = LoadTexture(screen, "button.bmp", SDL_TRUE, NULL, NULL);
- axis = LoadTexture(screen, "axis.bmp", SDL_TRUE, NULL, NULL);
+ button_texture = LoadTexture(screen, "button.bmp", SDL_TRUE, NULL, NULL);
+ axis_texture = LoadTexture(screen, "axis.bmp", SDL_TRUE, NULL, NULL);
- if (!background_front || !background_back || !button || !axis) {
+ if (!background_front || !background_back || !button_texture || !axis_texture) {
SDL_DestroyRenderer(screen);
SDL_DestroyWindow(window);
return 2;
}
- SDL_SetTextureColorMod(button, 10, 255, 21);
- SDL_SetTextureColorMod(axis, 10, 255, 21);
+ SDL_SetTextureColorMod(button_texture, 10, 255, 21);
+ SDL_SetTextureColorMod(axis_texture, 10, 255, 21);
/* !!! FIXME: */
/*SDL_RenderSetLogicalSize(screen, background->w, background->h);*/