Skip to content

Commit 269bc98

Browse files
committed
Change default screenshot path to a relative path
1 parent e75eb4e commit 269bc98

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

source/runtime.cpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ reshade::runtime::runtime(api::device *device, api::command_queue *graphics_queu
171171
_texture_search_paths({ L".\\" }),
172172
#endif
173173
_config_path(g_reshade_base_path / L"ReShade.ini"),
174-
_screenshot_path(g_reshade_base_path),
174+
_screenshot_path(L".\\"),
175175
_screenshot_name("%AppName% %Date% %Time%"),
176176
_screenshot_post_save_command_arguments("\"%TargetPath%\""),
177-
_screenshot_post_save_command_working_directory(g_reshade_base_path)
177+
_screenshot_post_save_command_working_directory(L".\\")
178178
{
179179
assert(device != nullptr && graphics_queue != nullptr);
180180

@@ -4307,21 +4307,13 @@ bool reshade::runtime::execute_screenshot_post_save_command(const std::filesyste
43074307
});
43084308
}
43094309

4310-
std::filesystem::path working_directory;
4311-
if (_screenshot_post_save_command_working_directory.empty() || !std::filesystem::is_directory(_screenshot_post_save_command_working_directory, ec))
4312-
working_directory = g_reshade_base_path;
4313-
else
4314-
working_directory = _screenshot_post_save_command_working_directory;
4315-
4316-
if (execute_command(command_line, working_directory, _screenshot_post_save_command_no_window))
4317-
{
4318-
return true;
4319-
}
4320-
else
4310+
if (!execute_command(command_line, g_reshade_base_path / _screenshot_post_save_command_working_directory, _screenshot_post_save_command_no_window))
43214311
{
43224312
LOG(ERROR) << "Failed to execute screenshot post-save command.";
43234313
return false;
43244314
}
4315+
4316+
return true;
43254317
}
43264318

43274319
bool reshade::runtime::get_texture_data(api::resource resource, api::resource_usage state, uint8_t *pixels)

source/runtime_gui.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,10 +2334,7 @@ void reshade::runtime::draw_gui_addons()
23342334
std::filesystem::path addon_search_path = g_reshade_base_path;
23352335
global_config().get("INSTALL", "AddonPath", addon_search_path);
23362336
if (imgui::directory_input_box("Add-on search path", addon_search_path, _file_selection_path))
2337-
{
23382337
global_config().set("INSTALL", "AddonPath", addon_search_path);
2339-
global_config().save();
2340-
}
23412338
#endif
23422339

23432340
ImGui::Spacing();
@@ -2380,7 +2377,6 @@ void reshade::runtime::draw_gui_addons()
23802377
disabled_addons.push_back(info.name);
23812378

23822379
global_config().set("ADDON", "DisabledAddons", disabled_addons);
2383-
global_config().save();
23842380
}
23852381

23862382
ImGui::PopStyleColor();

0 commit comments

Comments
 (0)