lsi: Teach configuration about libintercept toggle

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
Ikey Doherty
2017-10-10 23:17:29 +01:00
parent b458346f5a
commit 13afbe69c3
2 changed files with 12 additions and 2 deletions
+11 -2
View File
@@ -143,6 +143,13 @@ bool lsi_config_load(LsiConfig *config)
map_val = NULL;
}
/* Do we want libintercept? */
map_val = nc_hashmap_get(nc_hashmap_get(mconfig, "Steam"), "use-libintercept");
if (map_val) {
config->use_libintercept = lsi_is_boolean_true(map_val);
map_val = NULL;
}
/* Check if 32-bit is being forced */
map_val = nc_hashmap_get(nc_hashmap_get(mconfig, "Steam"), "force-32bit");
if (map_val) {
@@ -178,9 +185,10 @@ bool lsi_config_store(LsiConfig *config)
return false;
}
if (fprintf(fp,
"[Steam]\nuse-native-runtime = %s\nforce-32bit = %s\n",
"[Steam]\nuse-native-runtime = %s\nforce-32bit = %s\nuse-libintercept=%s\n",
lsi_bool_to_string(config->use_native_runtime),
lsi_bool_to_string(config->force_32)) < 0) {
lsi_bool_to_string(config->force_32),
lsi_bool_to_string(config->use_libintercept)) < 0) {
return false;
}
return true;
@@ -194,6 +202,7 @@ void lsi_config_load_defaults(LsiConfig *config)
* things that LSI knows about */
config->force_32 = false;
config->use_native_runtime = true;
config->use_libintercept = true;
}
void lsi_report_failure(const char *s, ...)
+1
View File
@@ -29,6 +29,7 @@
typedef struct LsiConfig {
bool force_32; /**<Do we force 32-bit? */
bool use_native_runtime; /**<Do we force our native runtime? */
bool use_libintercept; /**<Do we force libintercept? */
} LsiConfig;
/**