summaryrefslogtreecommitdiff
path: root/test/testgamecontroller.c
diff options
context:
space:
mode:
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>2016-09-21 23:06:38 +0200
committerPhilipp Wiesemann <philipp.wiesemann@arcor.de>2016-09-21 23:06:38 +0200
commit5cf858545edf8344a98ca27f24468eb8c0616d5e (patch)
tree1c47b986caafe1c8d2b5d15628112568c284d245 /test/testgamecontroller.c
parentb39f94e6ac1c50f77a7310938532145c7fde73e3 (diff)
downloadsdl-5cf858545edf8344a98ca27f24468eb8c0616d5e.tar.gz
Fixed compiling of three test programs with C++.
Diffstat (limited to 'test/testgamecontroller.c')
-rw-r--r--test/testgamecontroller.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index 908f40005..1f059a4e3 100644
--- a/test/testgamecontroller.c
+++ b/test/testgamecontroller.c
@@ -67,7 +67,7 @@ SDL_bool done = SDL_FALSE;
SDL_Texture *background, *button, *axis;
static SDL_Texture *
-LoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent)
+LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent)
{
SDL_Surface *temp = NULL;
SDL_Texture *texture = NULL;
@@ -129,7 +129,7 @@ loop(void *arg)
for (i = 0; i < SDL_CONTROLLER_BUTTON_MAX; ++i) {
if (SDL_GameControllerGetButton(gamecontroller, (SDL_GameControllerButton)i) == SDL_PRESSED) {
const SDL_Rect dst = { button_positions[i].x, button_positions[i].y, 50, 50 };
- SDL_RenderCopyEx(screen, button, NULL, &dst, 0, NULL, 0);
+ SDL_RenderCopyEx(screen, button, NULL, &dst, 0, NULL, SDL_FLIP_NONE);
}
}
@@ -139,11 +139,11 @@ loop(void *arg)
if (value < -deadzone) {
const SDL_Rect dst = { axis_positions[i].x, axis_positions[i].y, 50, 50 };
const double angle = axis_positions[i].angle;
- SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, 0);
+ SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
} else if (value > deadzone) {
const SDL_Rect dst = { axis_positions[i].x, axis_positions[i].y, 50, 50 };
const double angle = axis_positions[i].angle + 180.0;
- SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, 0);
+ SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
}
}