From 0168b9ddf237eb7654e189f16949d2b242541ee4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 19 Sep 2019 01:10:07 +0200 Subject: [PATCH] - fix RedNukem input. --- source/rr/src/osdcmds.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/rr/src/osdcmds.cpp b/source/rr/src/osdcmds.cpp index 4bab7b038..e680ef098 100644 --- a/source/rr/src/osdcmds.cpp +++ b/source/rr/src/osdcmds.cpp @@ -750,10 +750,15 @@ static int32_t osdcmd_name(osdfuncparm_t const * const parm) static int32_t osdcmd_button(osdfuncparm_t const * const parm) { - char const *p = parm->name+9; // skip "gamefunc_" -// if (g_player[myconnectindex].ps->gm == MODE_GAME) // only trigger these if in game - //CONTROL_OSDInput[CONFIG_FunctionNameToNum(p)] = 1; // FIXME - return OSDCMD_OK; + static char const s_gamefunc_[] = "gamefunc_"; + int constexpr strlen_gamefunc_ = ARRAY_SIZE(s_gamefunc_) - 1; + + char const* p = parm->name + strlen_gamefunc_; + + // if (g_player[myconnectindex].ps->gm == MODE_GAME) // only trigger these if in game + CONTROL_ButtonFlags[CONFIG_FunctionNameToNum(p)] = 1; // FIXME + + return OSDCMD_OK; } const keydef_t ConsoleKeys[]=