0
0
Fork 0
haikuports/games-emulation/vice/patches/vice-2.4.24.patchset

39 lines
1.1 KiB
Plaintext

From ee9390190d5c08329f292012872896ac6fe19d7d Mon Sep 17 00:00:00 2001
From: Mikolaj 'lich' Halber <lich@opmbx.org>
Date: Sat, 16 Jan 2016 01:34:10 +0000
Subject: Added Haiku paths system
diff --git a/src/arch/beos/archdep.c b/src/arch/beos/archdep.c
index 1b02f7b..64b4df9 100755
--- a/src/arch/beos/archdep.c
+++ b/src/arch/beos/archdep.c
@@ -60,6 +60,8 @@
#ifdef __HAIKU__
#include <sys/wait.h>
+#include <FindDirectory.h>
+#include <StorageDefs.h>
#endif
#include "archdep.h"
@@ -122,8 +124,14 @@ static char *boot_path = NULL;
const char *archdep_boot_path(void)
{
if (boot_path == NULL) {
+ #ifdef __HAIKU__
+ char haiku_path[B_PATH_NAME_LENGTH];
+ find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, true, haiku_path, sizeof(haiku_path)-strlen("/VICE/"));
+ strcat(haiku_path,"/VICE/");
+ boot_path = haiku_path;
+ #else
util_fname_split(argv0, &boot_path, NULL);
-
+ #endif
/* This should not happen, but you never know... */
if (boot_path == NULL) {
boot_path = lib_stralloc("./xxx");
--
2.2.2