Added space in the common state structure for render targets
authorSam Lantinga <slouken@libsdl.org>
Fri, 15 Nov 2013 22:01:58 -0800
changeset 7993 771138df6c62
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
--- a/include/SDL_test_common.h	Fri Nov 15 23:20:50 2013 -0500
+++ b/include/SDL_test_common.h	Fri Nov 15 22:01:58 2013 -0800
@@ -82,6 +82,7 @@
     Uint32 render_flags;
     SDL_bool skip_renderer;
     SDL_Renderer **renderers;
+    SDL_Texture **targets;
 
     /* Audio info */
     const char *audiodriver;
--- a/src/test/SDL_test_common.c	Fri Nov 15 23:20:50 2013 -0500
+++ b/src/test/SDL_test_common.c	Fri Nov 15 22:01:58 2013 -0800
@@ -809,6 +809,9 @@
         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 @@
             SDL_ShowWindow(state->windows[i]);
 
             state->renderers[i] = NULL;
+            state->targets[i] = NULL;
 
             if (!state->skip_renderer
                 && (state->renderdriver