Commit 30f7e868820fb7e08cbb41bbac3c2832ebf05bb1

Sam Lantinga 2013-11-15T22:01:58

Added space in the common state structure for render targets

diff --git a/include/SDL_test_common.h b/include/SDL_test_common.h
index 57f3114..5f67aa6 100644
--- a/include/SDL_test_common.h
+++ b/include/SDL_test_common.h
@@ -82,6 +82,7 @@ typedef struct
     Uint32 render_flags;
     SDL_bool skip_renderer;
     SDL_Renderer **renderers;
+    SDL_Texture **targets;
 
     /* Audio info */
     const char *audiodriver;
diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index f06c49e..e23b5bb 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -809,6 +809,9 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
         state->renderers =
             (SDL_Renderer **) SDL_malloc(state->num_windows *
                                         sizeof(*state->renderers));
+        state->targets =
+            (SDL_Texture **) SDL_malloc(state->num_windows *
+                                        sizeof(*state->targets));
         if (!state->windows || !state->renderers) {
             fprintf(stderr, "Out of memory!\n");
             return SDL_FALSE;
@@ -861,6 +864,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
             SDL_ShowWindow(state->windows[i]);
 
             state->renderers[i] = NULL;
+            state->targets[i] = NULL;
 
             if (!state->skip_renderer
                 && (state->renderdriver