Skip to content

Commit 7df48f1

Browse files
committed
Wii U / Video: Fixed resume of video afrer the home menu close
This bug happens just when V-Sync is off and attempting to open and close the home menu. To fix the black/frozen screen it's just enough to call the `GX2SetSwapInterval(0);` right after entering the foreground back.
1 parent 9112adf commit 7df48f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/video/wiiu/SDL_wiiuvideo.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
#include <gx2/state.h>
5858
#include <gx2r/mem.h>
5959
#include <gx2r/surface.h>
60+
#include <gx2/swap.h>
6061

6162
#define DRC_SCREEN_WIDTH 854
6263
#define DRC_SCREEN_HEIGHT 480
@@ -105,6 +106,9 @@ static int WIIU_ForegroundAcquired(_THIS)
105106
if (videodata->handleProcUI) {
106107
SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND);
107108
SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND);
109+
if (GX2GetSwapInterval() == 0) {
110+
GX2SetSwapInterval(0); /* If V-Sync is disabled, to let render not freeze, call this method with 0 */
111+
}
108112
}
109113

110114
while (window) {

0 commit comments

Comments
 (0)