From f069383b31cbf0f7fb18665b2ce01842a40f6945 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Wed, 13 Apr 2022 17:39:06 +0200 Subject: [PATCH] Allow to use blank function to force thumbstick to 8-way mode without assigning any actual action to diagonals --- android/app/src/main/cpp/code/vr/vr_input.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/android/app/src/main/cpp/code/vr/vr_input.c b/android/app/src/main/cpp/code/vr/vr_input.c index ae085c8d..b5b86345 100644 --- a/android/app/src/main/cpp/code/vr/vr_input.c +++ b/android/app/src/main/cpp/code/vr/vr_input.c @@ -259,13 +259,8 @@ static qboolean IN_GetInputAction(const char* inputName, char* action) char * val = Cvar_VariableString(cvarname); if (val && strlen(val) > 0) { - if (strcmp(val, "blank") == 0) { - // Empty function to block alt fallback on unmapped alt inputs - return qfalse; - } else { - Com_sprintf(action, 256, "%s", val); - return qtrue; - } + Com_sprintf(action, 256, "%s", val); + return qtrue; } //If we didn't find something for this input and the alt key is active, then see if the un-alt key has a function @@ -289,7 +284,11 @@ static qboolean IN_SendInputAction(const char* action, qboolean inputActive, flo if (action) { //handle our special actions first - if (strcmp(action, "+alt") == 0) + if (strcmp(action, "blank") == 0) { + // Empty function used to block alt fallback on unmapped alt buttons or + // force 8-way mapping mode of thumbstick without assigning actual action + } + else if (strcmp(action, "+alt") == 0) { alt_key_mode_active = inputActive; }