fix endian detection
quakefs.c:
	don't create the gamedir if userpath is .
This commit is contained in:
Bill Currie 2000-08-28 16:14:42 +00:00
parent 39920968d8
commit a6b179571f
2 changed files with 6 additions and 11 deletions

View file

@ -77,11 +77,7 @@ COM_Init
*/
void COM_Init ()
{
byte swaptest[2] = {1,0};
// set the byte swapping variables in a portable manner
if ( *(short *)swaptest == 1)
{
#ifndef WORDS_BIGENDIAN
bigendien = false;
BigShort = ShortSwap;
LittleShort = ShortNoSwap;
@ -89,9 +85,7 @@ void COM_Init ()
LittleLong = LongNoSwap;
BigFloat = FloatSwap;
LittleFloat = FloatNoSwap;
}
else
{
#else
bigendien = true;
BigShort = ShortNoSwap;
LittleShort = ShortSwap;
@ -99,7 +93,7 @@ void COM_Init ()
LittleLong = LongSwap;
BigFloat = FloatNoSwap;
LittleFloat = FloatSwap;
}
#endif
registered = Cvar_Get("registered", "0", CVAR_NONE, "None");
cmdline = Cvar_Get("cmdline", "0", CVAR_SERVERINFO, "None");

View file

@ -900,8 +900,9 @@ COM_InitFilesystem ( void )
/*
start up with basegame->string by default
*/
COM_CreatePath (va("%s/%s/dummy", fs_userpath->string,
fs_basegame->string));
if (strcmp (fs_userpath->string, FS_USERPATH))
COM_CreatePath (va("%s/%s/dummy", fs_userpath->string,
fs_basegame->string));
COM_AddGameDirectory(fs_basegame->string);
if (hipnotic)
COM_AddGameDirectory ("hipnotic");