change rsx_capture filename

This commit is contained in:
Megamouse 2018-06-24 12:43:50 +02:00
parent 7788007cbd
commit f8d396ac9e
4 changed files with 19 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#include "stdafx.h"
#include "date_time.h"
#include "rsx_methods.h"
#include "RSXThread.h"
#include "Emu/Memory/Memory.h"
@ -1106,7 +1107,7 @@ namespace rsx
rsx->capture_current_frame = false;
std::stringstream os;
cereal::BinaryOutputArchive archive(os);
const std::string& filePath = fs::get_config_dir() + "capture.rrc";
const std::string& filePath = fs::get_config_dir() + Emu.GetTitleID() + "_" + get_current_date_time() +"_capture.rrc";
archive(frame_capture);
{
// todo: 'dynamicly' create capture filename, also may want to compress this data?

13
rpcs3/date_time.h Normal file
View File

@ -0,0 +1,13 @@
#pragma once
#include <stdafx.h>
const std::string get_current_date_time()
{
time_t now = time(0);
tm* tstruct = localtime(&now);
char buf[80];
strftime(buf, sizeof(buf), "%Y%m%d%H%M%S", tstruct);
delete tstruct;
return buf;
}

View File

@ -390,6 +390,7 @@
<ClInclude Include="Crypto\unpkg.h" />
<ClInclude Include="Crypto\unself.h" />
<ClInclude Include="Crypto\utils.h" />
<ClInclude Include="date_time.h" />
<ClInclude Include="define_new_memleakdetect.h" />
<ClInclude Include="Emu\Cell\lv2\sys_gpio.h" />
<ClInclude Include="Emu\Cell\lv2\sys_net.h" />

View File

@ -1447,5 +1447,8 @@
<ClInclude Include="Emu\RSX\Overlays\overlays.h">
<Filter>Emu\GPU\RSX\Overlays</Filter>
</ClInclude>
<ClInclude Include="date_time.h">
<Filter>Utilities</Filter>
</ClInclude>
</ItemGroup>
</Project>