summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Volume.cpp
diff options
context:
space:
mode:
authorLeo Lam <leolino.lam@gmail.com>2017-06-15 23:28:36 +0200
committerGitHub <noreply@github.com>2017-06-15 23:28:36 +0200
commit8f460a1cda1a4d4208c4da9e01bf775f5f704498 (patch)
tree3ceea68574665cde97e5d2276bd9c320ceb579ad /Source/Core/DiscIO/Volume.cpp
parent9bc1b652fed28caac9042c42fce33f89363a88d3 (diff)
parentcf94ce63051458a2d8ac8b340a1020b863f1a6dd (diff)
Merge pull request #5611 from JosJuice/reorganize-file-namespace
Reorganize File namespace
Diffstat (limited to 'Source/Core/DiscIO/Volume.cpp')
-rw-r--r--Source/Core/DiscIO/Volume.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/Volume.cpp b/Source/Core/DiscIO/Volume.cpp
index 30b96d4ebf..876136e6b9 100644
--- a/Source/Core/DiscIO/Volume.cpp
+++ b/Source/Core/DiscIO/Volume.cpp
@@ -14,6 +14,7 @@
#include "Common/ColorUtil.h"
#include "Common/CommonTypes.h"
+#include "Common/File.h"
#include "Common/FileUtil.h"
#include "Common/NandPaths.h"
#include "Common/StringUtil.h"
@@ -43,13 +44,11 @@ std::vector<u32> Volume::GetWiiBanner(int* width, int* height, u64 title_id)
const std::string file_name =
Common::GetTitleDataPath(title_id, Common::FROM_CONFIGURED_ROOT) + "banner.bin";
- if (!File::Exists(file_name))
- return std::vector<u32>();
- if (File::GetSize(file_name) < WII_BANNER_OFFSET + WII_BANNER_SIZE)
+ File::IOFile file(file_name, "rb");
+ if (file.GetSize() < WII_BANNER_OFFSET + WII_BANNER_SIZE)
return std::vector<u32>();
- File::IOFile file(file_name, "rb");
if (!file.Seek(WII_BANNER_OFFSET, SEEK_SET))
return std::vector<u32>();