From f441dadfe6b7451f2b78d4153afecebdc1ffc4b1 Mon Sep 17 00:00:00 2001 From: Paulo Duarte Date: Mon, 31 May 2021 02:09:41 +0100 Subject: [PATCH] Fixes to allow a314 configuration on non default paths --- a314/files_pi/a314fs.py | 6 +++++- platforms/amiga/amiga-platform.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/a314/files_pi/a314fs.py b/a314/files_pi/a314fs.py index d07275b..6cf45d2 100755 --- a/a314/files_pi/a314fs.py +++ b/a314/files_pi/a314fs.py @@ -17,7 +17,11 @@ logging.basicConfig(format = '%(levelname)s, %(asctime)s, %(name)s, line %(linen logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) -CONFIG_FILE_PATH = 'a314/files_pi/a314fs.conf' +try: + idx = sys.argv.index('-conf-file') + CONFIG_FILE_PATH = sys.argv[idx + 1] +except (ValueError, IndexError): + CONFIG_FILE_PATH = 'a314/files_pi/a314fs.conf' SHARED_DIRECTORY = 'data/a314shared' METAFILE_EXTENSION = ':a314' diff --git a/platforms/amiga/amiga-platform.c b/platforms/amiga/amiga-platform.c index a7a8f34..160d2f9 100644 --- a/platforms/amiga/amiga-platform.c +++ b/platforms/amiga/amiga-platform.c @@ -449,7 +449,7 @@ void setvar_amiga(struct emulator_config *cfg, char *var, char *val) { a314_emulation_enabled = 1; } } - if CHKVAR("a314conf") { + if CHKVAR("a314_conf") { if (val && strlen(val) != 0) { a314_set_config_file(val); } -- 2.39.2