aboutsummaryrefslogtreecommitdiff
path: root/games/joequake/files/patch-keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/joequake/files/patch-keys.c')
-rw-r--r--games/joequake/files/patch-keys.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/games/joequake/files/patch-keys.c b/games/joequake/files/patch-keys.c
new file mode 100644
index 000000000000..f4476c489606
--- /dev/null
+++ b/games/joequake/files/patch-keys.c
@@ -0,0 +1,17 @@
+--- keys.c.orig Fri Oct 21 18:30:06 2005
++++ keys.c Mon Jan 16 18:47:12 2006
+@@ -783,11 +783,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);