@@ -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
43274319bool reshade::runtime::get_texture_data (api::resource resource, api::resource_usage state, uint8_t *pixels)
0 commit comments