mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Screenshot: add Title ID to filename
This commit is contained in:
parent
e51656e070
commit
00c87a8fc9
1 changed files with 9 additions and 2 deletions
|
@ -511,8 +511,9 @@ void gs_frame::take_screenshot(std::vector<u8> data, const u32 sshot_width, cons
|
|||
{
|
||||
screenshot_log.notice("Taking screenshot (%dx%d)", sshot_width, sshot_height);
|
||||
|
||||
const std::string& id = Emu.GetTitleID();
|
||||
std::string screen_path = fs::get_config_dir() + "screenshots/";
|
||||
if (const std::string id = Emu.GetTitleID(); !id.empty())
|
||||
if (!id.empty())
|
||||
{
|
||||
screen_path += id + "/";
|
||||
};
|
||||
|
@ -523,7 +524,13 @@ void gs_frame::take_screenshot(std::vector<u8> data, const u32 sshot_width, cons
|
|||
return;
|
||||
}
|
||||
|
||||
const std::string filename = screen_path + "screenshot-" + date_time::current_time_narrow<'_'>() + ".png";
|
||||
std::string filename = screen_path;
|
||||
if (!id.empty())
|
||||
{
|
||||
filename += id + "_";
|
||||
};
|
||||
|
||||
filename += "screenshot_" + date_time::current_time_narrow<'_'>() + ".png";
|
||||
|
||||
fs::file sshot_file(filename, fs::open_mode::create + fs::open_mode::write + fs::open_mode::excl);
|
||||
if (!sshot_file)
|
||||
|
|
Loading…
Add table
Reference in a new issue