Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed renderer variable scope.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 13, 2011
1 parent e0a941f commit 0b71b7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video/SDL_video.c
Expand Up @@ -208,12 +208,12 @@ static int
SDL_CreateWindowTexture(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch)
{
SDL_WindowTextureData *data;
SDL_Renderer *renderer = NULL;
SDL_RendererInfo info;
Uint32 i;

data = SDL_GetWindowData(window, SDL_WINDOWTEXTUREDATA);
if (!data) {
SDL_Renderer *renderer = NULL;
SDL_RendererInfo info;
int i;
const char *hint = SDL_GetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION);
Expand Down Expand Up @@ -267,7 +267,7 @@ SDL_CreateWindowTexture(_THIS, SDL_Window * window, Uint32 * format, void ** pix
data->pixels = NULL;
}

if (SDL_GetRendererInfo(renderer, &info) < 0) {
if (SDL_GetRendererInfo(data->renderer, &info) < 0) {
return -1;
}

Expand All @@ -281,7 +281,7 @@ SDL_CreateWindowTexture(_THIS, SDL_Window * window, Uint32 * format, void ** pix
}
}

data->texture = SDL_CreateTexture(renderer, *format,
data->texture = SDL_CreateTexture(data->renderer, *format,
SDL_TEXTUREACCESS_STREAMING,
window->w, window->h);
if (!data->texture) {
Expand Down

0 comments on commit 0b71b7e

Please sign in to comment.