Taking screenshots now creates an extra folder for each Game ID.

Fixes Issue 1905

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4842 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st 2010-01-15 16:11:06 +00:00
parent 8de76f8fe8
commit 5cd81033c3
1 changed files with 9 additions and 2 deletions

View File

@ -519,10 +519,17 @@ static inline std::string GenerateScreenshotName()
{
int index = 1;
std::string tempname, name;
tempname = FULL_SCREENSHOTS_DIR + GetStartupParameter().GetUniqueID();
std::string gameId = GetStartupParameter().GetUniqueID();
tempname = FULL_SCREENSHOTS_DIR + gameId + DIR_SEP_CHR;
if (!File::CreateFullPath(tempname.c_str())) {
//fallback to old-style screenshots, without folder.
tempname = FULL_SCREENSHOTS_DIR;
}
//append gameId, tempname only contains the folder here.
tempname += gameId;
name = StringFromFormat("%s-%d.png", tempname.c_str(), index);
while(File::Exists(name.c_str()))
name = StringFromFormat("%s-%d.png", tempname.c_str(), ++index);