src/render/SDL_render.c
changeset 6532 58f726a2fc82
parent 6531 1ab2e34b90cc
child 6533 c784245304dd
equal deleted inserted replaced
6531:1ab2e34b90cc 6532:58f726a2fc82
   266     if (renderer) {
   266     if (renderer) {
   267         renderer->magic = &renderer_magic;
   267         renderer->magic = &renderer_magic;
   268         renderer->window = window;
   268         renderer->window = window;
   269         renderer->scale.x = 1.0f;
   269         renderer->scale.x = 1.0f;
   270         renderer->scale.y = 1.0f;
   270         renderer->scale.y = 1.0f;
   271         renderer->logical_w = 0;
       
   272         renderer->logical_h = 0;
       
   273 
   271 
   274         if (SDL_GetWindowFlags(window) & (SDL_WINDOW_HIDDEN|SDL_WINDOW_MINIMIZED)) {
   272         if (SDL_GetWindowFlags(window) & (SDL_WINDOW_HIDDEN|SDL_WINDOW_MINIMIZED)) {
   275             renderer->hidden = SDL_TRUE;
   273             renderer->hidden = SDL_TRUE;
   276         } else {
   274         } else {
   277             renderer->hidden = SDL_FALSE;
   275             renderer->hidden = SDL_FALSE;
   297 
   295 
   298     renderer = SW_CreateRendererForSurface(surface);
   296     renderer = SW_CreateRendererForSurface(surface);
   299 
   297 
   300     if (renderer) {
   298     if (renderer) {
   301         renderer->magic = &renderer_magic;
   299         renderer->magic = &renderer_magic;
       
   300         renderer->scale.x = 1.0f;
       
   301         renderer->scale.y = 1.0f;
   302 
   302 
   303         SDL_RenderSetViewport(renderer, NULL);
   303         SDL_RenderSetViewport(renderer, NULL);
   304     }
   304     }
   305     return renderer;
   305     return renderer;
   306 #else
   306 #else