diff --git a/source/main.cpp b/source/main.cpp index d23f849..007a7a4 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -76,7 +76,10 @@ int main(int argc, char **argv) { VPADStatus vpad_data; VPADRead(VPAD_CHAN_0, &vpad_data, 1, &err); - uint32_t btn = vpad_data.hold | vpad_data.trigger; + uint32_t btn = 0; + if(err == VPAD_READ_SUCCESS) { + btn = vpad_data.hold | vpad_data.trigger; + } std::string environment_path = "fs:/vol/external01/wiiu/environments/default"; if ((btn & VPAD_BUTTON_X) == VPAD_BUTTON_X) {