mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
From 67f45f101334b06508457e85df77cbe340c69bea Mon Sep 17 00:00:00 2001
|
|
From: hfsfox <darkkitsunezx128k2309@gmail.com>
|
|
Date: Mon, 23 Oct 2023 01:31:18 +0300
|
|
Subject: fix settings dir
|
|
|
|
|
|
diff --git a/src/libaudcore/runtime.cc b/src/libaudcore/runtime.cc
|
|
index e6e6695..c47cde7 100644
|
|
--- a/src/libaudcore/runtime.cc
|
|
+++ b/src/libaudcore/runtime.cc
|
|
@@ -35,6 +35,9 @@
|
|
#ifdef __APPLE__
|
|
#include <mach-o/dyld.h>
|
|
#endif
|
|
+#ifdef __HAIKU__
|
|
+#include <FindDirectory.h>
|
|
+#endif
|
|
|
|
#include <glib.h>
|
|
#include <libintl.h>
|
|
@@ -249,6 +252,13 @@ static void set_install_paths()
|
|
static void set_config_paths()
|
|
{
|
|
const char * xdg_config_home = g_get_user_config_dir();
|
|
+ #ifdef __HAIKU__
|
|
+ char audaciousSettings[PATH_MAX] = "";
|
|
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, audaciousSettings, sizeof(audaciousSettings)) == B_OK) {
|
|
+ strcat(audaciousSettings, "/Audacious");
|
|
+ xdg_config_home = audaciousSettings;
|
|
+ }
|
|
+ #endif
|
|
StringBuf name = (instance_number == 1)
|
|
? str_copy("audacious")
|
|
: str_printf("audacious-%d", instance_number);
|
|
--
|
|
2.48.1
|
|
|