Map left and right C buttons to the touch screen

This commit is contained in:
Sean Maas 2021-02-18 16:51:53 -05:00
parent ced75f92b7
commit f4e7a6b4b9

View file

@ -53,4 +53,10 @@ void osContGetReadData(OSContPad *pad) {
if (keys & KEY_RIGHT) {
pad->stick_x = 80;
}
if (keys & KEY_TOUCH) {
touchPosition pos;
touchRead(&pos);
pad->button |= (pos.px < 128) ? L_CBUTTONS : R_CBUTTONS;
}
}