mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 15:21:44 +00:00
Put console_history.txt in the binary dir when fs_portable is 1.
This commit is contained in:
parent
00758277f1
commit
3032698f95
3 changed files with 23 additions and 7 deletions
|
@ -785,7 +785,15 @@ Key_WriteConsoleHistory()
|
|||
{
|
||||
int i;
|
||||
char path[MAX_OSPATH];
|
||||
Com_sprintf(path, sizeof(path), "%sconsole_history.txt", Sys_GetHomeDir());
|
||||
|
||||
if (fs_portable->value)
|
||||
{
|
||||
Com_sprintf(path, sizeof(path), "%sconsole_history.txt", Sys_GetBinaryDir());
|
||||
}
|
||||
else
|
||||
{
|
||||
Com_sprintf(path, sizeof(path), "%sconsole_history.txt", Sys_GetHomeDir());
|
||||
}
|
||||
|
||||
FILE* f = fopen(path, "w");
|
||||
|
||||
|
@ -824,7 +832,15 @@ Key_ReadConsoleHistory()
|
|||
int i;
|
||||
|
||||
char path[MAX_OSPATH];
|
||||
Com_sprintf(path, sizeof(path), "%sconsole_history.txt", Sys_GetHomeDir());
|
||||
|
||||
if (fs_portable->value)
|
||||
{
|
||||
Com_sprintf(path, sizeof(path), "%sconsole_history.txt", Sys_GetBinaryDir());
|
||||
}
|
||||
else
|
||||
{
|
||||
Com_sprintf(path, sizeof(path), "%sconsole_history.txt", Sys_GetHomeDir());
|
||||
}
|
||||
|
||||
FILE* f = fopen(path, "r");
|
||||
if(f==NULL)
|
||||
|
|
|
@ -943,11 +943,10 @@ FS_AddHomeAsGameDirectory(char *dir)
|
|||
char gdir[MAX_OSPATH];
|
||||
size_t len;
|
||||
|
||||
if (fs_portable->value)
|
||||
{
|
||||
Com_Printf("======================>>>>>>>>>>>> Portableflappen\n");
|
||||
return;
|
||||
}
|
||||
if (fs_portable->value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
home = Sys_GetHomeDir();
|
||||
|
||||
|
|
|
@ -726,6 +726,7 @@ extern cvar_t *modder;
|
|||
extern cvar_t *dedicated;
|
||||
extern cvar_t *host_speeds;
|
||||
extern cvar_t *log_stats;
|
||||
extern cvar_t *fs_portable;
|
||||
|
||||
extern FILE *log_stats_file;
|
||||
|
||||
|
|
Loading…
Reference in a new issue