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

Commit

Permalink
Initialized default scale for software renderer (thanks Marcus von Ap…
Browse files Browse the repository at this point in the history
…pen!)
  • Loading branch information
slouken committed Oct 2, 2012
1 parent fe35c26 commit dc135a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/SDL_render.c
Expand Up @@ -268,8 +268,6 @@ SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)
renderer->window = window;
renderer->scale.x = 1.0f;
renderer->scale.y = 1.0f;
renderer->logical_w = 0;
renderer->logical_h = 0;

if (SDL_GetWindowFlags(window) & (SDL_WINDOW_HIDDEN|SDL_WINDOW_MINIMIZED)) {
renderer->hidden = SDL_TRUE;
Expand Down Expand Up @@ -299,6 +297,8 @@ SDL_CreateSoftwareRenderer(SDL_Surface * surface)

if (renderer) {
renderer->magic = &renderer_magic;
renderer->scale.x = 1.0f;
renderer->scale.y = 1.0f;

SDL_RenderSetViewport(renderer, NULL);
}
Expand Down

0 comments on commit dc135a5

Please sign in to comment.