summaryrefslogtreecommitdiff
path: root/test/controllermap.c
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2014-02-09 15:20:41 -0500
committerRyan C. Gordon <icculus@icculus.org>2014-02-09 15:20:41 -0500
commit54409c187b4b01964cf460f50756f0e75cb232e0 (patch)
tree28b428e215ddc3b9396e7e19e74ce1d3d736599c /test/controllermap.c
parent5982c86e92d8805bb26bea5f6ccb0de2472a7b86 (diff)
downloadsdl-54409c187b4b01964cf460f50756f0e75cb232e0.tar.gz
No need to use a render target here.
Diffstat (limited to 'test/controllermap.c')
-rw-r--r--test/controllermap.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/controllermap.c b/test/controllermap.c
index 2366afea9..aa6c1cb32 100644
--- a/test/controllermap.c
+++ b/test/controllermap.c
@@ -108,7 +108,7 @@ WatchJoystick(SDL_Joystick * joystick)
{
SDL_Window *window = NULL;
SDL_Renderer *screen = NULL;
- SDL_Texture *target, *background, *button, *axis, *marker;
+ SDL_Texture *background, *button, *axis, *marker;
const char *name = NULL;
SDL_bool retval = SDL_FALSE;
SDL_bool done = SDL_FALSE, next=SDL_FALSE;
@@ -159,7 +159,6 @@ WatchJoystick(SDL_Joystick * joystick)
return SDL_FALSE;
}
- target = SDL_CreateTexture(screen, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_TARGET, MAP_WIDTH, MAP_HEIGHT);
background = LoadTexture(screen, "controllermap.bmp", SDL_FALSE);
button = LoadTexture(screen, "button.bmp", SDL_TRUE);
axis = LoadTexture(screen, "axis.bmp", SDL_TRUE);
@@ -226,13 +225,10 @@ WatchJoystick(SDL_Joystick * joystick)
}
}
- SDL_SetRenderTarget(screen, target);
SDL_RenderCopy(screen, background, NULL, NULL);
SDL_SetTextureAlphaMod(marker, alpha);
SDL_SetTextureColorMod(marker, 10, 255, 21);
SDL_RenderCopyEx(screen, marker, NULL, &dst, step->angle, NULL, 0);
- SDL_SetRenderTarget(screen, NULL);
- SDL_RenderCopy(screen, target, NULL, NULL);
SDL_RenderPresent(screen);
if (SDL_PollEvent(&event)) {