Skip to content

Commit ad29a9f

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 e24b719 commit ad29a9f

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
@@ -56,6 +56,7 @@
5656
#include <gx2/state.h>
5757
#include <gx2r/mem.h>
5858
#include <gx2r/surface.h>
59+
#include <gx2/swap.h>
5960

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

109113
while (window) {

0 commit comments

Comments
 (0)