diff options
| author | Lioncash <mathew1800@gmail.com> | 2013-04-16 23:14:36 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2013-04-16 23:14:36 -0400 |
| commit | 2316cb6876e6d79584ce0cc50771d2fb8495fe45 (patch) | |
| tree | 325aefd07068f7163d5616347cec36e6fac5754e /Source/Core/DiscIO/Src/FileMonitor.cpp | |
| parent | f4986862892d437bfcd1cc475ebe7af97c6923d8 (diff) | |
Remove all tab/space mismatches from the Core project. For anyone working on a branch that heavily involves the core, I am so sorry.
- Also killed off some trailing spaces/tabs.
- Updated the license header to be consistent with the rest of the project (All projects are now done moving over to this)
- Also, killed some dangling else's (where appropriate)
Now all the tab fixing is done. No more of this crap should be needed to be pushed. Rejoice!
Diffstat (limited to 'Source/Core/DiscIO/Src/FileMonitor.cpp')
| -rw-r--r-- | Source/Core/DiscIO/Src/FileMonitor.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/Core/DiscIO/Src/FileMonitor.cpp b/Source/Core/DiscIO/Src/FileMonitor.cpp index 465784fe8f..ad83c95a22 100644 --- a/Source/Core/DiscIO/Src/FileMonitor.cpp +++ b/Source/Core/DiscIO/Src/FileMonitor.cpp @@ -46,7 +46,7 @@ bool ShowSound(std::string FileName) SplitPath(FileName, NULL, NULL, &Ending); std::transform(Ending.begin(),Ending.end(),Ending.begin(),::tolower); - if ( + if ( (Ending == ".adp") // 1080 Avalanche, Crash Bandicoot, etc || (Ending == ".afc") // Zelda WW || (Ending == ".ast") // Zelda TP, Mario Kart @@ -76,6 +76,7 @@ void ReadGC(std::string FileName) delete pFileSystem; pFileSystem = NULL; } + // GCFiles' pointers are no longer valid after pFileSystem is cleared GCFiles.clear(); OpenISO = DiscIO::CreateVolumeFromFilename(FileName); @@ -99,7 +100,9 @@ void CheckFile(std::string File, u64 Size) if (CurrentFile == File) return; - if (Size > 0) Size = (Size / 1000); + if (Size > 0) + Size = (Size / 1000); + std::string Str = StringFromFormat("%s kB %s", ThousandSeparate(Size, 7).c_str(), File.c_str()); if (ShowSound(File)) { @@ -119,10 +122,16 @@ void CheckFile(std::string File, u64 Size) void FindFilename(u64 offset) { // Don't do anything if a game is not running - if (Core::GetState() != Core::CORE_RUN) return; + if (Core::GetState() != Core::CORE_RUN) + return; + // Or if the log is unselected - if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) return; - if (!FileAccess) return; + if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON)) + return; + + // Or if we don't have file access + if (!FileAccess) + return; if (!pFileSystem || ISOFile != SConfig::GetInstance().m_LastFilename) { |
