From 9b2ee5daafd82dcbef791e700719a84bd7495876 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 5 Apr 2015 14:06:23 -0500 Subject: [PATCH] start adding auto loading for remap files --- configuration.c | 15 +++++++++++++++ configuration.h | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/configuration.c b/configuration.c index 6ab27eec06..ccc36fa891 100644 --- a/configuration.c +++ b/configuration.c @@ -1742,6 +1742,21 @@ bool config_load_override(void) return true; /* only means no errors were caught */ } +/** + * config_load_remap: + * + * Tries to append game-specific and core-specific remap files. + * + * This function only has an effect if a game-specific or core-specific + * configuration file exists at respective locations. + * + * core-specific: $REMAP_DIR/$CORE_NAME/$CORE_NAME.cfg + * game-specific: $REMAP_DIR/$CORE_NAME/$GAME_NAME.cfg + * + * Returns: false if there was an error. + */ +bool config_load_remap(void); + static void parse_config_file(void) { global_t *global = global_get_ptr(); diff --git a/configuration.h b/configuration.h index 9c489cfcf8..2cda21494c 100644 --- a/configuration.h +++ b/configuration.h @@ -412,6 +412,16 @@ void config_load(void); */ bool config_load_override(void); +/** + * config_load_remap: + * + * Tries to append game-specific and core-specific remap files. + * + * Returns: false if there was an error. + * + */ +bool config_load_remap(void); + /** * config_save_keybinds_file: * @path : Path that shall be written to.