1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00
freebsd-ports/games/joequake/files/patch-keys.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

18 lines
522 B
C

--- ./keys.c.orig Sat Mar 25 15:00:04 2006
+++ ./keys.c Sat May 20 10:00:24 2006
@@ -808,11 +808,13 @@
void Key_Init (void)
{
// joe: added stuff from [sons]Quake
+ char cmdhist_path[MAX_OSPATH];
int i, j;
FILE *cmdhist;
cmdhistory_t cmdhistory;
- if ((cmdhist = fopen("joequake/cmdhist.dat", "rb")))
+ snprintf(cmdhist_path, sizeof(cmdhist_path), "%s/cmdhist.dat", com_gamedir);
+ if ((cmdhist = fopen(cmdhist_path, "rb")))
{
fread (&cmdhistory, sizeof(cmdhistory_t), 1, cmdhist);
fclose (cmdhist);