Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Initialized default scale for software renderer (thanks Marcus von Ap…
…pen!)
  • Loading branch information
slouken committed Oct 2, 2012
1 parent fe35c26 commit dc135a5a04a6b22cc575e70a627658f619e85e95
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/render/SDL_render.c
@@ -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;
@@ -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);
}

0 comments on commit dc135a5

Please sign in to comment.