make power and volume work even with the joycons connected (#85)

* hi einso

* make power and volume work even with the joycons connected

* fix keyboard with volume buttons

---------

Co-authored-by: suchmememanyskill <38142618+suchmememanyskill@users.noreply.github.com>
This commit is contained in:
bleck9999andsuchmememanyskill authored and GitHub committed 2023-09-26 16:18:39 +02:00
1 parent 917291374c
commit 91261f1671
3 files changed
+20 -12

No files matched your search

+11 -4
View File
@@ -157,12 +157,19 @@ char *ShowKeyboard(const char *toEdit, u8 alwaysRet){
}
int val = (input->up || input->down) ? 11 : 1;
// Btn buttons do not work lol
if (input->buttons & (JoyLLeft | JoyLUp | BtnVolM)){
if (input->volm) {
if (pos > 0)
pos -= 1;
}
else if (input->volp) {
if (pos < 43)
pos += 1;
}
else if (input->buttons & (JoyLLeft | JoyLUp)){
if (pos > -1 + val)
pos -= val;
}
if (input->buttons & (JoyLRight | JoyLDown | BtnVolP)){
else if (input->buttons & (JoyLRight | JoyLDown)){
if (pos < 44 - val)
pos += val;
}
@@ -178,4 +185,4 @@ char *ShowKeyboard(const char *toEdit, u8 alwaysRet){
}
return ret;
}
}