summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Volume.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-01-15 21:46:32 +0100
committerJosJuice <josjuice@gmail.com>2017-06-15 21:33:50 +0200
commitf09ceaa735080b8cde5f9102e7f061530d9b474e (patch)
tree5dfc15fa2b363db2165bca24d5b7e97bcdfcb4a8 /Source/Core/DiscIO/Volume.cpp
parent67dbbc67c0b3fa09e4f5c94ea67a83190c4e1a5e (diff)
Move IOFile to a separate file
Reduces the number of files that need to be recompiled when making changes to FileUtil.h.
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>();