mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 17:50:06 +02:00
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
From 99b4230d527066bb1297fc33c9ffe72007c6809d Mon Sep 17 00:00:00 2001
|
|
From: Peppersawce <michaelpeppers89@yahoo.it>
|
|
Date: Thu, 17 Apr 2025 02:55:45 +0200
|
|
Subject: Change settings path
|
|
|
|
|
|
diff --git a/Source/utils/paths.cpp b/Source/utils/paths.cpp
|
|
index 9635ac3..2298279 100644
|
|
--- a/Source/utils/paths.cpp
|
|
+++ b/Source/utils/paths.cpp
|
|
@@ -11,6 +11,11 @@
|
|
#include "utils/log.hpp"
|
|
#include "utils/sdl_ptrs.h"
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#include <fs_info.h>
|
|
+#endif
|
|
+
|
|
#ifdef __IPHONEOS__
|
|
#include "platform/ios/ios_paths.h"
|
|
#endif
|
|
@@ -84,6 +89,11 @@ const std::string &PrefPath()
|
|
prefPath = FromSDL(IOSGetPrefPath());
|
|
#elif defined(NXDK)
|
|
prefPath = NxdkGetPrefPath();
|
|
+#elif defined(__HAIKU__)
|
|
+ char cfgpath[B_PATH_NAME_LENGTH + 10];
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, dev_for_path("/boot"), false, cfgpath, B_PATH_NAME_LENGTH);
|
|
+ strcat(cfgpath, "/devilutionx/");
|
|
+ prefPath = strdup(cfgpath);
|
|
#else
|
|
prefPath = FromSDL(SDL_GetPrefPath("diasurgical", "devilution"));
|
|
#if !defined(__amigaos__)
|
|
@@ -103,6 +113,8 @@ const std::string &ConfigPath()
|
|
configPath = FromSDL(IOSGetPrefPath());
|
|
#elif defined(NXDK)
|
|
configPath = NxdkGetPrefPath();
|
|
+#elif defined(__HAIKU__)
|
|
+ configPath = prefPath;
|
|
#else
|
|
configPath = FromSDL(SDL_GetPrefPath("diasurgical", "devilution"));
|
|
#if !defined(__amigaos__)
|
|
--
|
|
2.48.1
|