mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 17:47:12 -04:00
Mobile: Fix speed/half-speed on-screen controls getting stuck down
This commit is contained in:
parent
b536b314a3
commit
aef4eb2f02
@ -1921,8 +1921,9 @@ static struct Widget* touch_widgets[1 + TOUCH_MAX_BTNS] = {
|
||||
|
||||
static void TouchScreen_OnscreenClick(void* screen, void* widget) {
|
||||
struct TouchScreen* s = (struct TouchScreen*)screen;
|
||||
int i = Screen_Index(screen, widget);
|
||||
Input_SetPressed(KeyBinds[s->onscreenDescs[i]->bind], true);
|
||||
int i = Screen_Index(screen, widget);
|
||||
int key = KeyBinds[s->onscreenDescs[i]->bind];
|
||||
Input_SetPressed(KeyBinds[s->onscreenDescs[i]->bind], !Input_Pressed[key]);
|
||||
}
|
||||
|
||||
static void TouchScreen_ChatClick(void* s, void* w) { ChatScreen_OpenInput(&String_Empty); }
|
||||
@ -1936,8 +1937,7 @@ static void TouchScreen_MoreClick(void* s, void* w) { TouchMoreScreen_Show(); }
|
||||
static void TouchScreen_BindClick(void* screen, void* widget) {
|
||||
struct TouchScreen* s = (struct TouchScreen*)screen;
|
||||
int i = Screen_Index(screen, widget) - ONSCREEN_MAX_BTNS;
|
||||
int key = KeyBinds[s->descs[i].bind];
|
||||
Input_SetPressed(key, !Input_Pressed[key]);
|
||||
Input_SetPressed(KeyBinds[s->descs[i].bind], true);
|
||||
}
|
||||
|
||||
static const struct TouchButtonDesc onscreenDescs[8] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user