From 051afd21e730005ea24ce3c8743962beb3085031 Mon Sep 17 00:00:00 2001 From: t895 Date: Thu, 28 Dec 2023 23:24:23 -0500 Subject: frontend_common: config: Refactor WriteSetting to stricter types Previously this could cause problems if a version of the template generated for WriteSetting didn't use the type you needed (e.g. floating point values). Now these are all ready without having to be used within frontend_common first. --- src/android/app/src/main/jni/android_config.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/android') diff --git a/src/android/app/src/main/jni/android_config.cpp b/src/android/app/src/main/jni/android_config.cpp index 9c3a5a9b2..fb17ab6f6 100644 --- a/src/android/app/src/main/jni/android_config.cpp +++ b/src/android/app/src/main/jni/android_config.cpp @@ -114,8 +114,9 @@ void AndroidConfig::SavePathValues() { for (size_t i = 0; i < AndroidSettings::values.game_dirs.size(); ++i) { SetArrayIndex(i); const auto& game_dir = AndroidSettings::values.game_dirs[i]; - WriteSetting(std::string("path"), game_dir.path); - WriteSetting(std::string("deep_scan"), game_dir.deep_scan, std::make_optional(false)); + WriteStringSetting(std::string("path"), game_dir.path); + WriteBooleanSetting(std::string("deep_scan"), game_dir.deep_scan, + std::make_optional(false)); } EndArray(); -- cgit v1.2.3