mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@847 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
eece4e2b75
commit
098c99e3f7
1 changed files with 94 additions and 105 deletions
|
@ -656,8 +656,8 @@ static int OSD_FindDiffPoint(const char *str1, const char *str2)
|
|||
|
||||
static void OSD_HistoryPrev(void)
|
||||
{
|
||||
if (osdhistorypos < osdhistorysize-1)
|
||||
{
|
||||
if (osdhistorypos >= osdhistorysize-1) return;
|
||||
|
||||
osdhistorypos++;
|
||||
memcpy(osdeditbuf, osdhistorybuf[osdhistorypos], EDITLENGTH+1);
|
||||
osdeditlen = osdeditcursor = 0;
|
||||
|
@ -675,12 +675,11 @@ static void OSD_HistoryPrev(void)
|
|||
osdeditwinstart+=(osdeditcursor-osdeditwinend),
|
||||
osdeditwinend+=(osdeditcursor-osdeditwinend);
|
||||
}
|
||||
}
|
||||
|
||||
static void OSD_HistoryNext(void)
|
||||
{
|
||||
if (osdhistorypos >= 0)
|
||||
{
|
||||
if (osdhistorypos < 0) return;
|
||||
|
||||
if (osdhistorypos == 0)
|
||||
{
|
||||
osdeditlen=0;
|
||||
|
@ -688,9 +687,9 @@ static void OSD_HistoryNext(void)
|
|||
osdeditwinstart=0;
|
||||
osdeditwinend=editlinewidth;
|
||||
osdhistorypos = -1;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
osdhistorypos--;
|
||||
memcpy(osdeditbuf, osdhistorybuf[osdhistorypos], EDITLENGTH+1);
|
||||
osdeditlen = osdeditcursor = 0;
|
||||
|
@ -708,8 +707,6 @@ static void OSD_HistoryNext(void)
|
|||
osdeditwinstart+=(osdeditcursor-osdeditwinend),
|
||||
osdeditwinend+=(osdeditcursor-osdeditwinend);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int OSD_HandleChar(char ch)
|
||||
{
|
||||
|
@ -781,11 +778,7 @@ int OSD_HandleChar(char ch)
|
|||
{
|
||||
tabc = findsymbol(osdedittmp, NULL);
|
||||
|
||||
if (tabc)
|
||||
{
|
||||
if (tabc->next)
|
||||
{
|
||||
if (findsymbol(osdedittmp, tabc->next))
|
||||
if (tabc && tabc->next && findsymbol(osdedittmp, tabc->next))
|
||||
{
|
||||
symbol_t *symb=tabc;
|
||||
int maxwidth = 0, x = 0, num = 0;
|
||||
|
@ -814,25 +807,21 @@ int OSD_HandleChar(char ch)
|
|||
maxwidth += 3;
|
||||
symb = tabc;
|
||||
OSD_Printf(" ");
|
||||
while (symb && symb != lastmatch)
|
||||
while (symb && (symb != lastmatch))
|
||||
{
|
||||
tabc = symb;
|
||||
tabc = lastmatch = symb;
|
||||
OSD_Printf("%-*s",maxwidth,symb->name);
|
||||
x += maxwidth;
|
||||
lastmatch = symb;
|
||||
symb=findsymbol(osdedittmp, lastmatch->next);
|
||||
if (x > osdcols - maxwidth)
|
||||
x += maxwidth;
|
||||
if (x > (osdcols - maxwidth))
|
||||
{
|
||||
x = 0;
|
||||
OSD_Printf("\n");
|
||||
if (symb && symb != lastmatch)
|
||||
if (symb && (symb != lastmatch))
|
||||
OSD_Printf(" ");
|
||||
}
|
||||
}
|
||||
if (x)
|
||||
OSD_Printf("\n");
|
||||
}
|
||||
}
|
||||
if (x) OSD_Printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue