mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 17:11:23 +00:00
Atomic RSX capture writes
This commit is contained in:
parent
9ccf39b27f
commit
447d2b6f93
@ -2889,10 +2889,13 @@ namespace rsx
|
|||||||
capture_current_frame = false;
|
capture_current_frame = false;
|
||||||
|
|
||||||
const std::string file_path = fs::get_config_dir() + "captures/" + Emu.GetTitleID() + "_" + date_time::current_time_narrow() + "_capture.rrc";
|
const std::string file_path = fs::get_config_dir() + "captures/" + Emu.GetTitleID() + "_" + date_time::current_time_narrow() + "_capture.rrc";
|
||||||
const std::string file_data = cereal_serialize(frame_capture);
|
|
||||||
|
|
||||||
// todo: may want to compress this data?
|
// todo: may want to compress this data?
|
||||||
if (fs::write_file(file_path, fs::rewrite, file_data))
|
const std::string file_data = cereal_serialize(frame_capture);
|
||||||
|
|
||||||
|
fs::pending_file temp(file_path);
|
||||||
|
|
||||||
|
if (temp.file && (temp.file.write(file_data), temp.commit(false)))
|
||||||
{
|
{
|
||||||
rsx_log.success("Capture successful: %s", file_path);
|
rsx_log.success("Capture successful: %s", file_path);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user