summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/BannerLoaderWii.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2011-03-11 10:21:46 +0000
committerJordan Woyak <jordan.woyak@gmail.com>2011-03-11 10:21:46 +0000
commit59fd1008ca9cf4e9f75fdd6ee8ec53a2c7d7a13b (patch)
tree1de127fb452967ccc052324d9aff0775ea1b76cf /Source/Core/DiscIO/Src/BannerLoaderWii.cpp
parent4f69672b2b31581746aae907e7757981fc48db77 (diff)
Wrapped fopen/close/read/write functions inside a simple "IOFile" class. Reading, writing, and error checking became simpler in most cases. It should be near impossible to forget to close a file now that the destructor takes care of it. (I hope this fixes Issue 3635) I have tested the functionality of most things, but it is possible I broke something. :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7328 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO/Src/BannerLoaderWii.cpp')
-rw-r--r--Source/Core/DiscIO/Src/BannerLoaderWii.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp
index a43675ec87..9c02ef8d08 100644
--- a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp
+++ b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp
@@ -87,11 +87,10 @@ CBannerLoaderWii::CBannerLoaderWii(DiscIO::IVolume *pVolume)
if (FileSize > 0)
{
m_pBannerFile = new u8[FileSize];
- FILE* pFile = fopen(Filename, "rb");
+ File::IOFile pFile(Filename, "rb");
if (pFile)
{
- fread(m_pBannerFile, FileSize, 1, pFile);
- fclose(pFile);
+ pFile.ReadBytes(m_pBannerFile, FileSize);
m_IsValid = true;
}
}