summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeGC.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2016-06-28 18:05:44 +0200
committerJosJuice <josjuice@gmail.com>2016-06-28 18:05:44 +0200
commit202c9d58cdbb7883a8da6f37186d4985c6dc0cf5 (patch)
tree1d2dd95a77f08bbf6ad4ead6f632771836451517 /Source/Core/DiscIO/VolumeGC.cpp
parent10682dbf5843bcf55cda7db4bc4e5acaee556648 (diff)
VolumeGC: Set m_banner_loaded when banner loading fails
If banner loading fails once, it will very likely fail again. Setting m_banner_loaded to true when banner loading fails prevents LoadBannerFile from wasting time if it's called again. Banner loading requires loading the file system, which takes a noticeable amount of time, so this matters.
Diffstat (limited to 'Source/Core/DiscIO/VolumeGC.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeGC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp
index 4c364b941b..1d688bb2cb 100644
--- a/Source/Core/DiscIO/VolumeGC.cpp
+++ b/Source/Core/DiscIO/VolumeGC.cpp
@@ -205,6 +205,8 @@ void CVolumeGC::LoadBannerFile() const
if (m_banner_loaded)
return;
+ m_banner_loaded = true;
+
GCBanner banner_file;
std::unique_ptr<IFileSystem> file_system(CreateFileSystem(this));
size_t file_size = (size_t)file_system->GetFileSize("opening.bnr");
@@ -235,7 +237,6 @@ void CVolumeGC::LoadBannerFile() const
}
ExtractBannerInformation(banner_file, is_bnr1);
- m_banner_loaded = true;
}
void CVolumeGC::ExtractBannerInformation(const GCBanner& banner_file, bool is_bnr1) const