Skip to content

Commit

Permalink
Fix an error in my last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayon2000 committed May 25, 2024
1 parent 301cab5 commit 9538834
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ int main(int argc, char **argv)
// Insert the IP address (some code was taken from the IP Address selector of geckiine made by brienj)
while(running == true) {
VPADRead(VPAD_CHAN_0, &vpad_data, 1, &error);
if (vpad_data.hold & VPAD_BUTTON_LEFT) {
if (vpad_data.hold & VPAD_BUTTON_LEFT && selected_digit > 0) {
if (vpad_data.trigger & VPAD_BUTTON_LEFT || wait_time_horizontal++ > wait_time) {
selected_digit--;
wait_time_horizontal = 0;
}
}
if (vpad_data.hold & VPAD_BUTTON_RIGHT) {
if (vpad_data.hold & VPAD_BUTTON_RIGHT && selected_digit < 3) {
if (vpad_data.trigger & VPAD_BUTTON_RIGHT || wait_time_horizontal++ > wait_time) {
selected_digit++;
wait_time_horizontal = 0;
Expand Down

0 comments on commit 9538834

Please sign in to comment.