mirror of
https://github.com/wiiu-env/AutobootModule.git
synced 2024-06-14 20:08:46 +02:00
Skip update warning with any controller
This commit is contained in:
parent
10161be0a2
commit
d7577b15e9
|
@ -14,6 +14,7 @@
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <nn/act/client_cpp.h>
|
#include <nn/act/client_cpp.h>
|
||||||
|
#include <padscore/kpad.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sysapp/title.h>
|
#include <sysapp/title.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -395,9 +396,19 @@ void handleUpdateWarningScreen() {
|
||||||
VPADStatus vpad{};
|
VPADStatus vpad{};
|
||||||
VPADRead(VPAD_CHAN_0, &vpad, 1, nullptr);
|
VPADRead(VPAD_CHAN_0, &vpad, 1, nullptr);
|
||||||
|
|
||||||
if (vpad.trigger & VPAD_BUTTON_A) {
|
KPADStatus kpad;
|
||||||
|
uint32_t wiimoteButtonsTriggered = 0;
|
||||||
|
uint32_t classicButtonsTriggered = 0;
|
||||||
|
for (int32_t i = 0; i < 4; i++) {
|
||||||
|
if (KPADRead((KPADChan) i, &kpad, 1) > 0) {
|
||||||
|
wiimoteButtonsTriggered |= kpad.trigger;
|
||||||
|
classicButtonsTriggered |= kpad.classic.trigger;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vpad.trigger & VPAD_BUTTON_A || wiimoteButtonsTriggered & WPAD_BUTTON_A || classicButtonsTriggered & WPAD_CLASSIC_BUTTON_A) {
|
||||||
break;
|
break;
|
||||||
} else if (vpad.trigger & VPAD_BUTTON_B) {
|
} else if (vpad.trigger & VPAD_BUTTON_B || wiimoteButtonsTriggered & WPAD_BUTTON_B || classicButtonsTriggered & WPAD_CLASSIC_BUTTON_B) {
|
||||||
f = fopen(UPDATE_SKIP_PATH, "w");
|
f = fopen(UPDATE_SKIP_PATH, "w");
|
||||||
if (f) {
|
if (f) {
|
||||||
// It's **really** important to have this text on the stack.
|
// It's **really** important to have this text on the stack.
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <gx2/state.h>
|
#include <gx2/state.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <mocha/mocha.h>
|
#include <mocha/mocha.h>
|
||||||
|
#include <padscore/kpad.h>
|
||||||
#include <sndcore2/core.h>
|
#include <sndcore2/core.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -48,6 +49,9 @@ int32_t main(int32_t argc, char **argv) {
|
||||||
OSFatal("AutobootModule: Mocha_InitLibrary failed");
|
OSFatal("AutobootModule: Mocha_InitLibrary failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KPADInit();
|
||||||
|
WPADEnableURCC(1);
|
||||||
|
|
||||||
VPADStatus vpad{};
|
VPADStatus vpad{};
|
||||||
// Buffer vpad read.
|
// Buffer vpad read.
|
||||||
VPADRead(VPAD_CHAN_0, &vpad, 1, nullptr);
|
VPADRead(VPAD_CHAN_0, &vpad, 1, nullptr);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user