mirror of
https://github.com/yawut/SDL.git
synced 2026-08-20 07:44:03 -05:00
wiiu/render: only call GX2SetTV/DRCEnable once
This commit is contained in:
committed by
Dave Murphy
parent
c57900ca16
commit
d044179298
@@ -27,7 +27,6 @@
|
||||
#include "../SDL_sysrender.h"
|
||||
#include "SDL_render_wiiu.h"
|
||||
|
||||
#include <whb/gfx.h>
|
||||
#include <gx2/registers.h>
|
||||
#include <gx2/state.h>
|
||||
#include <gx2/draw.h>
|
||||
@@ -36,6 +35,8 @@
|
||||
#include <gx2r/buffer.h>
|
||||
#include <gx2r/draw.h>
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user