mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
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.
This commit is contained in:
parent
fd1da994fa
commit
96b613eab3
@ -146,6 +146,7 @@ SW_CreateRendererForSurface(SDL_Surface * surface)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
data->surface = surface;
|
data->surface = surface;
|
||||||
|
data->window = surface;
|
||||||
|
|
||||||
renderer->WindowEvent = SW_WindowEvent;
|
renderer->WindowEvent = SW_WindowEvent;
|
||||||
renderer->GetOutputSize = SW_GetOutputSize;
|
renderer->GetOutputSize = SW_GetOutputSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user