diff --git a/source/build/src/osd.cpp b/source/build/src/osd.cpp index 4d4f0d223..cd18c6bff 100644 --- a/source/build/src/osd.cpp +++ b/source/build/src/osd.cpp @@ -504,7 +504,7 @@ static int osdfunc_listsymbols(osdcmdptr_t parm) int maxwidth = 0; for (auto symb=osd->symbols; symb!=NULL; symb=symb->next) - if (symb->func != OSD_UNALIASED) + if (symb->func != OSD_UNALIASED && symb->help != NULL) maxwidth = max(maxwidth, Bstrlen(symb->name)); if (maxwidth > 0) @@ -523,7 +523,7 @@ static int osdfunc_listsymbols(osdcmdptr_t parm) for (auto symb=osd->symbols; symb!=NULL; symb=symb->next) { - if (symb->func == OSD_UNALIASED || (parm->numparms == 1 && Bstrncmp(parm->parms[0], symb->name, parmlen))) + if (symb->func == OSD_UNALIASED || symb->help == NULL || (parm->numparms == 1 && Bstrncmp(parm->parms[0], symb->name, parmlen))) continue; int const var = hash_find(&h_cvars, symb->name); @@ -2014,7 +2014,7 @@ static osdsymbol_t * osd_findsymbol(const char * const pszName, osdsymbol_t *pSy for (; pSymbol; pSymbol=pSymbol->next) { - if (pSymbol->func != OSD_UNALIASED && !Bstrncasecmp(pszName, pSymbol->name, nameLen)) + if (pSymbol->func != OSD_UNALIASED && pSymbol->help != NULL && !Bstrncasecmp(pszName, pSymbol->name, nameLen)) return pSymbol; } diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index 197d74e71..9d487e315 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -703,6 +703,16 @@ void CONFIG_WriteSettings(void) // save binds and aliases to _settings. } } + for (int i=0; inumparms != 1) + return OSDCMD_OK; + + int const gameFunc = CONFIG_FunctionNameToNum(parm->parms[0]); + + if (gameFunc != -1) + ud.config.KeyboardKeys[gameFunc][0] = 0; + + return OSDCMD_OK; +} + static int osdcmd_quicksave(osdcmdptr_t UNUSED(parm)) { UNREFERENCED_CONST_PARAMETER(parm); @@ -1781,6 +1794,7 @@ int32_t registerosdcommands(void) OSD_RegisterFunction("unbind","unbind : unbinds a key", osdcmd_unbind); OSD_RegisterFunction("unbindall","unbindall: unbinds all keys", osdcmd_unbindall); + OSD_RegisterFunction("unbound", NULL, osdcmd_unbound); OSD_RegisterFunction("vidmode","vidmode : change the video mode",osdcmd_vidmode); #ifdef USE_OPENGL