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@942 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2030a42763
commit
19ac7da999
2 changed files with 17 additions and 17 deletions
|
@ -816,25 +816,21 @@ int32 CONFIG_ReadSetup(void)
|
|||
{
|
||||
char *ptr = strtok(tempbuf,",");
|
||||
palette_t temppal;
|
||||
if (ptr != NULL)
|
||||
char *palptr = (char *)&temppal;
|
||||
|
||||
i = 0;
|
||||
while (ptr != NULL && i < 3)
|
||||
{
|
||||
temppal.r = atoi(ptr);
|
||||
palptr[i++] = atoi(ptr);
|
||||
ptr = strtok(NULL,",");
|
||||
if (ptr != NULL)
|
||||
}
|
||||
if (i == 3)
|
||||
{
|
||||
temppal.g = atoi(ptr);
|
||||
ptr = strtok(NULL,",");
|
||||
if (ptr != NULL)
|
||||
{
|
||||
temppal.b = atoi(ptr);
|
||||
ptr = strtok(NULL,",");
|
||||
Bmemcpy(&crosshair_colors,&temppal,sizeof(palette_t));
|
||||
default_crosshair_colors.f = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CONFIG_ReadKeys();
|
||||
|
||||
|
@ -1013,8 +1009,12 @@ void CONFIG_WriteSetup(void)
|
|||
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "WindowPosY", windowy, false, false);
|
||||
#endif
|
||||
|
||||
if (crosshair_colors.r != default_crosshair_colors.r || crosshair_colors.g != default_crosshair_colors.g
|
||||
|| crosshair_colors.b != default_crosshair_colors.b)
|
||||
{
|
||||
Bsprintf(tempbuf,"%d,%d,%d",crosshair_colors.r,crosshair_colors.g,crosshair_colors.b);
|
||||
SCRIPT_PutString(ud.config.scripthandle, "Misc", "CrosshairColor",tempbuf);
|
||||
}
|
||||
|
||||
// JBF 20031211
|
||||
for (dummy=0;dummy<NUMGAMEFUNCTIONS;dummy++)
|
||||
|
|
|
@ -1329,7 +1329,7 @@ static int osdcmd_crosshaircolor(const osdfuncparm_t *parm)
|
|||
|
||||
if (parm->numparms != 3)
|
||||
{
|
||||
OSD_Printf("\"crosshaircolor\" : r:%d g:%d b:%d\n",crosshair_colors.r,crosshair_colors.g,crosshair_colors.b);
|
||||
OSD_Printf("crosshaircolor: r:%d g:%d b:%d\n",crosshair_colors.r,crosshair_colors.g,crosshair_colors.b);
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
r = atol(parm->parms[0]);
|
||||
|
|
Loading…
Reference in a new issue