mirror of
https://github.com/wiiu-env/PayloadLoaderPayload.git
synced 2025-01-14 09:29:16 +01:00
Fix checking button combo
This commit is contained in:
parent
3f71bb4d7f
commit
a6bc48e987
15
src/main.cpp
15
src/main.cpp
@ -57,11 +57,16 @@ extern "C" uint32_t start_wrapper(int argc, char **argv) {
|
|||||||
|
|
||||||
DEBUG_FUNCTION_LINE_VERBOSE("Hello from payload.elf multiloader");
|
DEBUG_FUNCTION_LINE_VERBOSE("Hello from payload.elf multiloader");
|
||||||
|
|
||||||
VPADReadError err;
|
VPADStatus vpadStatus{};
|
||||||
VPADStatus vpad_data;
|
VPADReadError vpadError = VPAD_READ_UNINITIALIZED;
|
||||||
VPADRead(VPAD_CHAN_0, &vpad_data, 1, &err);
|
int btn = 0;
|
||||||
|
do {
|
||||||
uint32_t btn = vpad_data.hold | vpad_data.trigger;
|
if (VPADRead(VPAD_CHAN_0, &vpadStatus, 1, &vpadError) > 0 && vpadError == VPAD_READ_SUCCESS) {
|
||||||
|
btn = vpadStatus.trigger | vpadStatus.hold;
|
||||||
|
} else {
|
||||||
|
OSSleepTicks(OSMillisecondsToTicks(1));
|
||||||
|
}
|
||||||
|
} while (vpadError == VPAD_READ_NO_SAMPLES);
|
||||||
|
|
||||||
std::map<std::string, std::string> payloads = get_all_payloads("wiiu/payloads");
|
std::map<std::string, std::string> payloads = get_all_payloads("wiiu/payloads");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user