| 176 | } |
| 177 | |
| 178 | void Settings::Save() { |
| 179 | this->json_settings.general.value().language = GetLanguageCode(this->lang); |
| 180 | |
| 181 | this->json_settings.ui.value().light_color_scheme = json::UiColorScheme{}; |
| 182 | GenerateColorScheme(this->light_color_scheme, this->json_settings.ui.value().light_color_scheme.value(), DefaultLightScheme); |
| 183 | |
| 184 | this->json_settings.ui.value().dark_color_scheme = json::UiColorScheme{}; |
| 185 | GenerateColorScheme(this->dark_color_scheme, this->json_settings.ui.value().dark_color_scheme.value(), DefaultDarkScheme); |
| 186 | |
| 187 | GLEAF_ASSERT_TRUE(!glz::write_file_json<PartialJsonOptions{}>(this->json_settings, "sdmc:/" GLEAF_PATH_SETTINGS_FILE, std::string{})); |
| 188 | } |
| 189 | |
| 190 | std::string Settings::PathForResource(const std::string &res_path) { |
| 191 | auto romfs_exp = fs::GetRomFsExplorer(); |
no test coverage detected