From d044179298c1f83ca805f9055441f8382b8ea3dc Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Fri, 7 Apr 2023 13:24:27 +0200 Subject: [PATCH] wiiu/render: only call GX2SetTV/DRCEnable once --- src/render/wiiu/SDL_rpresent_wiiu.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/render/wiiu/SDL_rpresent_wiiu.c b/src/render/wiiu/SDL_rpresent_wiiu.c index d1a4839df..bcd82adcd 100644 --- a/src/render/wiiu/SDL_rpresent_wiiu.c +++ b/src/render/wiiu/SDL_rpresent_wiiu.c @@ -27,7 +27,6 @@ #include "../SDL_sysrender.h" #include "SDL_render_wiiu.h" -#include #include #include #include @@ -36,6 +35,8 @@ #include #include +static SDL_bool tvDrcEnabled = SDL_FALSE; + void WIIU_SDL_RenderPresent(SDL_Renderer * renderer) { WIIU_RenderData *data = (WIIU_RenderData *) renderer->driverdata; @@ -59,8 +60,11 @@ void WIIU_SDL_RenderPresent(SDL_Renderer * renderer) GX2SetContextState(data->ctx); /* TV and DRC can now be enabled after the first frame was drawn */ - GX2SetTVEnable(TRUE); - GX2SetDRCEnable(TRUE); + if (!tvDrcEnabled) { + GX2SetTVEnable(TRUE); + GX2SetDRCEnable(TRUE); + tvDrcEnabled = SDL_TRUE; + } /* Wait for vsync */ if (renderer->info.flags & SDL_RENDERER_PRESENTVSYNC) {