From bb16350c24b6f80c99fbad5451f30ddb9c9729b3 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Nov 2025 08:15:56 +0100 Subject: [PATCH] FDD Audio: Fix the loading of the configuration file so it does not depend on the current working directory. --- src/floppy/fdd_audio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/floppy/fdd_audio.c b/src/floppy/fdd_audio.c index b2c77e42a..5fe5e6358 100644 --- a/src/floppy/fdd_audio.c +++ b/src/floppy/fdd_audio.c @@ -195,8 +195,15 @@ void fdd_audio_load_profiles(void) { ini_t profiles_ini; + char cfg_fn[1024] = { 0 }; - profiles_ini = ini_read_ex("assets/sounds/fdd/fdd_audio_profiles.cfg", 1); + int ret = asset_getfile("assets/sounds/fdd/fdd_audio_profiles.cfg", cfg_fn, 1024); + if (!ret) { + fdd_log("FDD Audio: Could not find profiles\n"); + return; + } + + profiles_ini = ini_read_ex(cfg_fn, 1); if (profiles_ini == NULL) { fdd_log("FDD Audio: Could not load profiles\n"); return;