From e3ec4191f7fa86689363e53b186e000db698d8f4 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 13 Mar 2022 09:57:05 +0000 Subject: [PATCH] Allow pushing of A button to skip full server search --- android/app/src/main/cpp/code/q3_ui/ui_servers2.c | 4 ++-- android/app/src/main/cpp/code/vr/vr_input.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/cpp/code/q3_ui/ui_servers2.c b/android/app/src/main/cpp/code/q3_ui/ui_servers2.c index 63b7830d..14e5f184 100644 --- a/android/app/src/main/cpp/code/q3_ui/ui_servers2.c +++ b/android/app/src/main/cpp/code/q3_ui/ui_servers2.c @@ -422,7 +422,7 @@ static void ArenaServers_UpdateMenu( void ) { if( g_arenaservers.refreshservers && ( g_arenaservers.currentping <= g_arenaservers.numqueriedservers ) ) { // show progress Com_sprintf( g_arenaservers.status.string, MAX_STATUSLENGTH, "%d of %d Arena Servers.", g_arenaservers.currentping, g_arenaservers.numqueriedservers); - g_arenaservers.statusbar.string = "Press SPACE to stop"; + g_arenaservers.statusbar.string = "Press A button to stop"; qsort( g_arenaservers.serverlist, *g_arenaservers.numservers, sizeof( servernode_t ), ArenaServers_Compare); } else { @@ -450,7 +450,7 @@ static void ArenaServers_UpdateMenu( void ) { // no servers found if( g_arenaservers.refreshservers ) { strcpy( g_arenaservers.status.string,"Scanning For Servers." ); - g_arenaservers.statusbar.string = "Press SPACE to stop"; + g_arenaservers.statusbar.string = "Press A button to stop"; // disable controls during refresh g_arenaservers.gametype.generic.flags |= QMF_GRAYED; 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 36352099..6f4740fd 100644 --- a/android/app/src/main/cpp/code/vr/vr_input.c +++ b/android/app/src/main/cpp/code/vr/vr_input.c @@ -256,6 +256,12 @@ static void IN_SendButtonAction(const char* action, qboolean pressed) { vr.weapon_stabilised = pressed; } + //Special case for moveup as we can send a space key instead allowing us to skip + //server search in the server menu + else if (strcmp(action, "+moveup") == 0) + { + Com_QueueEvent(in_vrEventTime, SE_KEY, K_SPACE, pressed, 0, NULL); + } else if (strcmp(action, "+weapon_select") == 0) { vr.weapon_select = pressed;