Convert GetUserPath to return a std::string instead of a const char *. This simplifies its usage in most cases.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7265 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2011-02-28 20:40:15 +00:00
commit ba54fac9eb
82 changed files with 408 additions and 449 deletions

View file

@ -153,9 +153,9 @@ bool GameListItem::LoadFromCache()
void GameListItem::SaveToCache()
{
if (!File::IsDirectory(File::GetUserPath(D_CACHE_IDX)))
if (!File::IsDirectory(File::GetUserPath(D_CACHE_IDX).c_str()))
{
File::CreateDir(File::GetUserPath(D_CACHE_IDX));
File::CreateDir(File::GetUserPath(D_CACHE_IDX).c_str());
}
CChunkFileReader::Save<GameListItem>(CreateCacheFilename(), CACHE_REVISION, *this);
@ -190,7 +190,7 @@ std::string GameListItem::CreateCacheFilename()
extension.c_str(), HashFletcher((const u8 *)LegalPathname.c_str(), LegalPathname.size()),
File::GetSize(m_FileName.c_str())));
std::string fullname(std::string(File::GetUserPath(D_CACHE_IDX)));
std::string fullname(File::GetUserPath(D_CACHE_IDX));
fullname += Filename;
return fullname;
}
@ -229,7 +229,8 @@ const std::string GameListItem::GetWiiFSPath() const
Iso->GetTitleID((u8*)&Title);
Title = Common::swap64(Title);
sprintf(Path, "%stitle/%08x/%08x/data/", File::GetUserPath(D_WIIUSER_IDX), (u32)(Title>>32), (u32)Title);
sprintf(Path, "%stitle/%08x/%08x/data/",
File::GetUserPath(D_WIIUSER_IDX).c_str(), (u32)(Title>>32), (u32)Title);
if (!File::Exists(Path))
File::CreateFullPath(Path);