Skip to content

Commit

Permalink
video/wiiu: Don't replace an already running ProcUI
Browse files Browse the repository at this point in the history
  • Loading branch information
ashquarky committed Apr 23, 2020
1 parent e3d2191 commit eb05b49
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/video/wiiu/SDL_wiiuvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,28 @@
#include <string.h>
#include <stdint.h>

#include <proc_ui/procui.h>

#include "wiiu_shaders.h"

static int WIIU_VideoInit(_THIS);
static int WIIU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode);
static void WIIU_VideoQuit(_THIS);
static void WIIU_PumpEvents(_THIS);

static int using_whb_proc = 0;

#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 720

static int WIIU_VideoInit(_THIS)
{
SDL_DisplayMode mode;

WHBProcInit();
if (!ProcUIIsRunning()) {
WHBProcInit();
using_whb_proc = 1;
}
WHBGfxInit();

// setup shader
Expand All @@ -82,9 +89,9 @@ static int WIIU_VideoInit(_THIS)

static void WIIU_VideoQuit(_THIS)
{
wiiuFreeTextureShader();
wiiuFreeTextureShader();
WHBGfxShutdown();
WHBProcShutdown();
if (using_whb_proc) WHBProcShutdown();
}

static int WIIU_CreateSDLWindow(_THIS, SDL_Window *window) {
Expand Down

0 comments on commit eb05b49

Please sign in to comment.