Added space in the common state structure for render targets
authorSam Lantinga <slouken@libsdl.org>
Fri, 15 Nov 2013 22:01:58 -0800
changeset 7993771138df6c62
parent 7992 6558e2b68c03
child 7994 37c48b4ecb0c
Added space in the common state structure for render targets
include/SDL_test_common.h
src/test/SDL_test_common.c
     1.1 --- a/include/SDL_test_common.h	Fri Nov 15 23:20:50 2013 -0500
     1.2 +++ b/include/SDL_test_common.h	Fri Nov 15 22:01:58 2013 -0800
     1.3 @@ -82,6 +82,7 @@
     1.4      Uint32 render_flags;
     1.5      SDL_bool skip_renderer;
     1.6      SDL_Renderer **renderers;
     1.7 +    SDL_Texture **targets;
     1.8  
     1.9      /* Audio info */
    1.10      const char *audiodriver;
     2.1 --- a/src/test/SDL_test_common.c	Fri Nov 15 23:20:50 2013 -0500
     2.2 +++ b/src/test/SDL_test_common.c	Fri Nov 15 22:01:58 2013 -0800
     2.3 @@ -809,6 +809,9 @@
     2.4          state->renderers =
     2.5              (SDL_Renderer **) SDL_malloc(state->num_windows *
     2.6                                          sizeof(*state->renderers));
     2.7 +        state->targets =
     2.8 +            (SDL_Texture **) SDL_malloc(state->num_windows *
     2.9 +                                        sizeof(*state->targets));
    2.10          if (!state->windows || !state->renderers) {
    2.11              fprintf(stderr, "Out of memory!\n");
    2.12              return SDL_FALSE;
    2.13 @@ -861,6 +864,7 @@
    2.14              SDL_ShowWindow(state->windows[i]);
    2.15  
    2.16              state->renderers[i] = NULL;
    2.17 +            state->targets[i] = NULL;
    2.18  
    2.19              if (!state->skip_renderer
    2.20                  && (state->renderdriver