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
This commit is contained in:
Jordan Woyak
2011-03-11 10:21:46 +00:00
parent 4f69672b2b
commit 59fd1008ca
68 changed files with 1112 additions and 1154 deletions

View File

@ -19,6 +19,7 @@
#define _DRIVE_BLOB_H
#include "Blob.h"
#include "FileUtil.h"
#ifdef _WIN32
#include <windows.h>
@ -39,7 +40,7 @@ private:
PREVENT_MEDIA_REMOVAL pmrLockCDROM;
bool IsOK() {return hDisc != INVALID_HANDLE_VALUE;}
#else
FILE* file_;
File::IOFile file_;
bool IsOK() {return file_ != 0;}
#endif
s64 size;