Compare commits

...

2 Commits

Author SHA1 Message Date
Maschell
88d25a79c3 Fix Makefile to be compatible with CLion 2024-04-26 10:33:05 +02:00
Maschell
a6bc48e987 Fix checking button combo 2024-04-26 10:33:05 +02:00
2 changed files with 11 additions and 6 deletions

View File

@ -127,7 +127,7 @@ export OUTPUT := $(CURDIR)/$(TARGET)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
$(BUILD): $(BUILD):
@[ -d $@ ] || mkdir -p $@ @$(shell [ ! -d $(BUILD) ] && mkdir -p $(BUILD))
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile

View File

@ -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");