mirror of
https://github.com/wiiu-env/EnvironmentLoader.git
synced 2024-11-23 22:49:15 +01:00
Fix black screen on the TV when coldbooting and opening the environment selection screen
This commit is contained in:
parent
2e61281d0a
commit
9b86283cfd
@ -1,5 +1,6 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
#include <gx2/state.h>
|
||||||
#include <elfio/elfio.hpp>
|
#include <elfio/elfio.hpp>
|
||||||
#include <proc_ui/procui.h>
|
#include <proc_ui/procui.h>
|
||||||
#include <sysapp/launch.h>
|
#include <sysapp/launch.h>
|
||||||
@ -254,6 +255,7 @@ std::string EnvironmentSelectionScreen(const std::map<std::string, std::string>
|
|||||||
if (!screenBuffer) {
|
if (!screenBuffer) {
|
||||||
OSFatal("Fail to allocate screenBuffer");
|
OSFatal("Fail to allocate screenBuffer");
|
||||||
}
|
}
|
||||||
|
memset(screenBuffer, 0, tvBufferSize + drcBufferSize);
|
||||||
|
|
||||||
OSScreenSetBufferEx(SCREEN_TV, screenBuffer);
|
OSScreenSetBufferEx(SCREEN_TV, screenBuffer);
|
||||||
OSScreenSetBufferEx(SCREEN_DRC, screenBuffer + tvBufferSize);
|
OSScreenSetBufferEx(SCREEN_DRC, screenBuffer + tvBufferSize);
|
||||||
@ -351,11 +353,8 @@ std::string EnvironmentSelectionScreen(const std::map<std::string, std::string>
|
|||||||
|
|
||||||
DrawUtils::deinitFont();
|
DrawUtils::deinitFont();
|
||||||
|
|
||||||
if (OSGetTitleID() == _SYSGetSystemApplicationTitleId(SYSTEM_APP_ID_MII_MAKER)) {
|
// Call GX2Init to shut down OSScreen
|
||||||
// When we're in the Mii Maker "OSScreenShutdown" will cause a black screen.
|
GX2Init(nullptr);
|
||||||
} else {
|
|
||||||
OSScreenShutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
free(screenBuffer);
|
free(screenBuffer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user