Skip to content

Commit 6c8aa83

Browse files
authored
Wii U / Video: Fixed resume of video afrer the home menu close (#107)
* 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. * Move out of handleProcUI cond and tweaked comment
1 parent 4145c17 commit 6c8aa83

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/video/wiiu/SDL_wiiuvideo.c

Lines changed: 5 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
@@ -107,6 +108,10 @@ static int WIIU_ForegroundAcquired(_THIS)
107108
SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND);
108109
}
109110

111+
if (GX2GetSwapInterval() == 0) {
112+
GX2SetSwapInterval(0); /* Workaround for leaving foreground with a swap interval 0 */
113+
}
114+
110115
while (window) {
111116
SDL_Renderer* renderer = SDL_GetRenderer(window);
112117

0 commit comments

Comments
 (0)