aaaa-1.1.patchset revision 5ab7ad2d
1From ed099174e329d792de8b18e7aba960768c039179 Mon Sep 17 00:00:00 2001
2From: Gerasim Troeglazov <3dEyes@gmail.com>
3Date: Mon, 9 Sep 2019 23:54:02 +1000
4Subject: Set current dir
5
6
7diff --git a/aaaa/src/main/cpp/AAAA-Engine/main.c b/aaaa/src/main/cpp/AAAA-Engine/main.c
8index 81242ed..738acc1 100644
9--- a/aaaa/src/main/cpp/AAAA-Engine/main.c
10+++ b/aaaa/src/main/cpp/AAAA-Engine/main.c
11@@ -4,6 +4,15 @@
12 
13 int main(int argc, char *argv[])
14 {
15+#ifdef __HAIKU__
16+	char *binpath = realpath(argv[0], NULL);
17+	if (binpath != NULL) {
18+		char *appdir = strrchr(binpath, '/');
19+		*appdir = '\0';
20+		chdir(binpath);
21+		free(binpath);
22+	}
23+#endif
24     zresminit();
25 
26     zcoreinit();
27-- 
282.23.0
29
30