1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00
freebsd-ports/games/joequake/files/patch-host.c
Alejandro Pulver 624ff38926 - Fix building in non i386 architectures (change in Makefile.linux).
- Use Q1DIR directly, instead of assigning it to DATADIR.

Approved by:	garga (mentor, implicitly)
2006-05-20 13:29:07 +00:00

21 lines
582 B
C

--- ./host.c.orig Sun Apr 16 15:42:16 2006
+++ ./host.c Sat May 20 10:00:24 2006
@@ -964,6 +964,7 @@
*/
void Host_Shutdown (void)
{
+ char cmdhist_path[MAX_OSPATH];
int i, j;
FILE *cmdhist;
cmdhistory_t cmdhistory;
@@ -984,7 +985,8 @@
Host_WriteConfiguration ();
IPLog_WriteLog ();
- if (con_initialized && (cmdhist = fopen("joequake/cmdhist.dat", "wb")))
+ snprintf(cmdhist_path, sizeof(cmdhist_path), "%s/cmdhist.dat", com_gamedir);
+ if (con_initialized && (cmdhist = fopen(cmdhist_path, "wb")))
{
for (i=0 ; i<64 ; i++)
for (j=0 ; j<MAXCMDLINE ; j++)