MCPcopy Create free account
hub / github.com/crosire/reshade / export_current_preset

Method export_current_preset

source/runtime_api.cpp:1329–1348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1327 save_current_preset(ini_file::load_cache(_current_preset_path));
1328}
1329void reshade::runtime::export_current_preset(const char *path_in) const
1330{
1331 if (path_in == nullptr)
1332 return;
1333
1334 std::filesystem::path preset_path = std::filesystem::u8path(path_in);
1335
1336 std::error_code ec;
1337 resolve_path(preset_path, ec);
1338
1339 if (ini_file *const cached_preset = ini_file::find_cache(preset_path))
1340 {
1341 save_current_preset(*cached_preset);
1342 return;
1343 }
1344
1345 ini_file preset(preset_path);
1346 save_current_preset(preset);
1347 preset.save();
1348}
1349
1350void reshade::runtime::get_current_preset_path(char *path, size_t *size) const
1351{

Callers

nothing calls this directly

Calls 2

resolve_pathFunction · 0.85
saveMethod · 0.80

Tested by

no test coverage detected