Package: pax-britannica / 1.0.0-2

load_resources_from_usr_share.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- pax-britannica.orig/dokidoki-support/minlua.c
+++ pax-britannica/dokidoki-support/minlua.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <errno.h>
 
 #include <lua.h>
 #include <lauxlib.h>
@@ -169,7 +170,12 @@
             use_logfile = 0;
     log_init(use_logfile);
 
-    switch_to_game_directory();
+    // switch_to_game_directory();
+    char *dir = "/usr/share/pax-britannica";
+    log_messagef("changing directory to '%s'", dir);
+    int success = chdir(dir);
+    if(success == -1)
+        perror("chdir()");
 
     // load lua and libraries
     lua_State *L = lua_open();