From f09ceaa735080b8cde5f9102e7f061530d9b474e Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 15 Jan 2017 21:46:32 +0100 Subject: Move IOFile to a separate file Reduces the number of files that need to be recompiled when making changes to FileUtil.h. --- Source/Core/DiscIO/Volume.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Core/DiscIO/Volume.cpp') 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 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(); - 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(); - File::IOFile file(file_name, "rb"); if (!file.Seek(WII_BANNER_OFFSET, SEEK_SET)) return std::vector(); -- cgit v1.2.3