From 922f36f5467ed2a7b3f1cf3691f04796fb994411 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 4 Oct 2006 05:59:22 +0000 Subject: [PATCH] Use CRC32 to make fatx compatible filenames on Xbox --- stepmania/src/SongCacheIndex.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/SongCacheIndex.cpp b/stepmania/src/SongCacheIndex.cpp index 5d8d2ce94d..4120b57fc0 100644 --- a/stepmania/src/SongCacheIndex.cpp +++ b/stepmania/src/SongCacheIndex.cpp @@ -50,7 +50,12 @@ RString SongCacheIndex::GetCacheFilePath( const RString &sGroup, const RString & for( size_t pos = s.find_first_of(invalid); pos != RString::npos; pos = s.find_first_of(invalid, pos) ) s[pos] = '_'; // CACHE_DIR ends with a /. +#if defined(XBOX) + // Use CRC32 to make fatx compatible filenames. + return ssprintf( "%s%s/%X", SpecialFiles::CACHE_DIR.c_str(), sGroup.c_str(), GetHashForString(s)); +#else return ssprintf( "%s%s/%s", SpecialFiles::CACHE_DIR.c_str(), sGroup.c_str(), s.c_str() ); +#endif } SongCacheIndex::SongCacheIndex()