mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-24 21:56:53 +01:00
config menu: Init KPAD if needed
This commit is contained in:
parent
8071ceabf4
commit
6e02c4b7a1
@ -214,6 +214,7 @@ void ConfigUtils::openConfigMenu() {
|
||||
|
||||
bool skipScreen0Free = false;
|
||||
bool skipScreen1Free = false;
|
||||
bool doShutdownKPAD = false;
|
||||
|
||||
if (!screenbuffer0 || !screenbuffer1) {
|
||||
if (screenbuffer0 == nullptr) {
|
||||
@ -259,8 +260,19 @@ void ConfigUtils::openConfigMenu() {
|
||||
// disable the home button menu to prevent opening it when exiting
|
||||
OSEnableHomeButtonMenu(false);
|
||||
|
||||
KPADStatus status;
|
||||
KPADError err;
|
||||
if (KPADReadEx(WPAD_CHAN_0, &status, 0, &err) == 0 && err == KPAD_ERROR_UNINITIALIZED) {
|
||||
doShutdownKPAD = true;
|
||||
KPADInit();
|
||||
}
|
||||
|
||||
displayMenu();
|
||||
|
||||
if (doShutdownKPAD) {
|
||||
KPADShutdown();
|
||||
}
|
||||
|
||||
OSEnableHomeButtonMenu(wasHomeButtonMenuEnabled);
|
||||
|
||||
DrawUtils::deinitFont();
|
||||
|
Loading…
Reference in New Issue
Block a user