From 00573ef36401649205a479b8846c36beced4a7be Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 7 Sep 2021 21:20:39 +1000
Subject: Disable haptic init


diff --git a/src/seg009.c b/src/seg009.c
index eed2afa..38d5a7c 100644
--- a/src/seg009.c
+++ b/src/seg009.c
@@ -2436,7 +2436,7 @@ void __pascal far set_gr_mode(byte grmode) {
 	SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1");
 #endif
 	if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE |
-	             SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC ) != 0) {
+	             SDL_INIT_GAMECONTROLLER ) != 0) {
 		sdlperror("set_gr_mode: SDL_Init");
 		quit(1);
 	}
-- 
2.30.2


From fb6250a7a6d31777812838e35907ebce8e372585 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 7 Sep 2021 21:20:48 +1000
Subject: Set working directory


diff --git a/src/main.c b/src/main.c
index f59ba27..1c80cfd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,15 @@ The authors of this program may be contacted at https://forum.princed.org
 
 int main(int argc, char *argv[])
 {
+#ifdef __HAIKU__
+	char *binpath = realpath(argv[0], NULL);
+	if (binpath != NULL) {
+		char *appdir = strrchr(binpath, '/');
+		*appdir = '\0';
+		chdir(binpath);
+		free(binpath);
+	}
+#endif
 	g_argc = argc;
 	g_argv = argv;
 	pop_main();
-- 
2.30.2

