Only use the VPAD values if the reading was successful

This commit is contained in:
Maschell 2020-12-11 15:54:50 +01:00
parent 4c82b93cd7
commit 544ec49785

View File

@ -59,7 +59,11 @@ 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;
}
bool loadWithoutHacks = false;
bool kernelDone = false;
bool skipKernel = false;