make repeating binds the default and added "bind norepeat"

binds which call console commands should use norepeat


git-svn-id: https://svn.eduke32.com/eduke32@812 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-06-29 12:13:10 +00:00
parent 586ad8bab4
commit f003af45dc

View file

@ -991,15 +991,15 @@ static int osdcmd_bind(const osdfuncparm_t *parm)
} }
j = 1; j = 1;
if (parm->numparms >= 2 && !Bstrcasecmp(parm->parms[j],"repeat")) if (parm->numparms >= 2 && !Bstrcasecmp(parm->parms[j],"norepeat"))
{ {
boundkeys[keynames[i].id].repeat = 1; boundkeys[keynames[i].id].repeat = 0;
j++; j++;
} }
else boundkeys[keynames[i].id].repeat = 0; else boundkeys[keynames[i].id].repeat = 1;
Bstrncpy(boundkeys[keynames[i].id].name,parm->parms[j], MAXBINDSTRINGLENGTH-1); Bstrncpy(boundkeys[keynames[i].id].name,parm->parms[j], MAXBINDSTRINGLENGTH-1);
boundkeys[keynames[i].id].key=keynames[i].name; boundkeys[keynames[i].id].key=keynames[i].name;
OSD_Printf("key %s repeat %d string %s\n",keynames[i].name,boundkeys[keynames[i].id].repeat, boundkeys[keynames[i].id].name); // OSD_Printf("key %s repeat %d string %s\n",keynames[i].name,boundkeys[keynames[i].id].repeat, boundkeys[keynames[i].id].name);
return OSDCMD_OK; return OSDCMD_OK;
} }
@ -1011,7 +1011,7 @@ static int osdcmd_unbind(const osdfuncparm_t *parm)
{ {
for (i=0;i<MAXBOUNDKEYS;i++)if (*boundkeys[i].name) for (i=0;i<MAXBOUNDKEYS;i++)if (*boundkeys[i].name)
boundkeys[i].name[0] = 0; boundkeys[i].name[0] = 0;
OSD_Printf("unbound all key\n"); OSD_Printf("unbound all keys\n");
return OSDCMD_OK; return OSDCMD_OK;
} }
if (parm->numparms < 1) return OSDCMD_SHOWHELP; if (parm->numparms < 1) return OSDCMD_SHOWHELP;