mirror of
https://github.com/yawut/SDL.git
synced 2026-08-16 13:56:59 -05:00
wiiu/render: Don't allow updating render target while in background
This commit is contained in:
committed by
Dave Murphy
parent
32777c470a
commit
a63e0d188d
@@ -177,11 +177,16 @@ void WIIU_SDL_DestroyWindowTex(SDL_Renderer * renderer, SDL_Window * window)
|
||||
int WIIU_SDL_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||
{
|
||||
WIIU_RenderData *data = (WIIU_RenderData *) renderer->driverdata;
|
||||
WIIU_VideoData *videodata = (WIIU_VideoData *) SDL_GetVideoDevice()->driverdata;
|
||||
|
||||
/* Set window or texture as target */
|
||||
WIIU_TextureData *tdata = (WIIU_TextureData *)((texture) ? texture->driverdata
|
||||
: data->windowTex.driverdata);
|
||||
|
||||
if (!videodata->hasForeground) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* make sure we're using the correct renderer ctx */
|
||||
GX2SetContextState(data->ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user