From 7df48f18519ae78242dd8dce4556cd696c1090b1 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Tue, 23 Sep 2025 23:26:51 +0300 Subject: [PATCH 1/2] 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. --- src/video/wiiu/SDL_wiiuvideo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/wiiu/SDL_wiiuvideo.c b/src/video/wiiu/SDL_wiiuvideo.c index 1a428c0432c49..c4435200d7beb 100644 --- a/src/video/wiiu/SDL_wiiuvideo.c +++ b/src/video/wiiu/SDL_wiiuvideo.c @@ -57,6 +57,7 @@ #include #include #include +#include #define DRC_SCREEN_WIDTH 854 #define DRC_SCREEN_HEIGHT 480 @@ -105,6 +106,9 @@ static int WIIU_ForegroundAcquired(_THIS) if (videodata->handleProcUI) { SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND); SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND); + if (GX2GetSwapInterval() == 0) { + GX2SetSwapInterval(0); /* If V-Sync is disabled, to let render not freeze, call this method with 0 */ + } } while (window) { From 578556641269154078fccef8b5c58f690e3cfbb1 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Wed, 24 Sep 2025 01:18:09 +0300 Subject: [PATCH 2/2] Move out of handleProcUI cond and tweaked comment --- src/video/wiiu/SDL_wiiuvideo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/video/wiiu/SDL_wiiuvideo.c b/src/video/wiiu/SDL_wiiuvideo.c index c4435200d7beb..1aa7ae9177c98 100644 --- a/src/video/wiiu/SDL_wiiuvideo.c +++ b/src/video/wiiu/SDL_wiiuvideo.c @@ -106,9 +106,10 @@ static int WIIU_ForegroundAcquired(_THIS) if (videodata->handleProcUI) { SDL_SendAppEvent(SDL_APP_WILLENTERFOREGROUND); SDL_SendAppEvent(SDL_APP_DIDENTERFOREGROUND); - if (GX2GetSwapInterval() == 0) { - GX2SetSwapInterval(0); /* If V-Sync is disabled, to let render not freeze, call this method with 0 */ - } + } + + if (GX2GetSwapInterval() == 0) { + GX2SetSwapInterval(0); /* Workaround for leaving foreground with a swap interval 0 */ } while (window) {