From 96b613eab3ef9adf8d897c5221599b28037a68e0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 13 Jul 2014 09:04:55 -0700 Subject: [PATCH] Fixed bug 2640 - Unable to SDL_SetRenderTarget to original surface for software renderer without a window Damian Kaczmarek Basically this bug is probably not a common use case. My goal is to allow rendering totally without a window, for example to a screenshot and I need to rely on SDL_SetRenderTarget to properly work for a purely software renderer created by SDL_CreateSoftwareRenderer. --- src/render/software/SDL_render_sw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c index 1e5673bf4f9cc..37f42f0720291 100644 --- a/src/render/software/SDL_render_sw.c +++ b/src/render/software/SDL_render_sw.c @@ -146,6 +146,7 @@ SW_CreateRendererForSurface(SDL_Surface * surface) return NULL; } data->surface = surface; + data->window = surface; renderer->WindowEvent = SW_WindowEvent; renderer->GetOutputSize = SW_GetOutputSize;