summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/VolumeCreator.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-02-24 19:57:29 +0000
committerhrydgard <hrydgard@gmail.com>2009-02-24 19:57:29 +0000
commit4fef62aa3b5587c47631160727ba86ca66637bc3 (patch)
tree7a346dc2dc1d378776fc9a4a9d1f7fff9fb31aa1 /Source/Core/DiscIO/Src/VolumeCreator.cpp
parent6eb19ec78c26269634fc89557bde1d04b185a090 (diff)
Be friendlier when trying to but from empty DVD drives.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2422 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DiscIO/Src/VolumeCreator.cpp')
-rw-r--r--Source/Core/DiscIO/Src/VolumeCreator.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Core/DiscIO/Src/VolumeCreator.cpp b/Source/Core/DiscIO/Src/VolumeCreator.cpp
index bb1d785abe..b3c84b85c6 100644
--- a/Source/Core/DiscIO/Src/VolumeCreator.cpp
+++ b/Source/Core/DiscIO/Src/VolumeCreator.cpp
@@ -93,7 +93,7 @@ IVolume* CreateVolumeFromFilename(const std::string& _rFilename)
delete pReader;
}
- return(pVolume);
+ return pVolume;
}
break;
@@ -133,17 +133,17 @@ IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _VolumeType,
FILE* pT = fopen(MasterKeyFile, "rb");
if (pT == NULL)
{
- if(PanicYesNo("Can't open '%s'.\n If you know the key, now it's the time to paste it into "
+ if (PanicYesNo("Can't open '%s'.\n If you know the key, now it's the time to paste it into "
"'%s' before pressing [YES].", MasterKeyFile, MasterKeyFileHex))
{
pT = fopen(MasterKeyFileHex, "r");
- if(pT==NULL){
+ if (!pT) {
PanicAlert("could not open %s", MasterKeyFileHex);
return NULL;
}
static char hexkey[32];
- if(fread(hexkey,1,32,pT)<32)
+ if (fread(hexkey, 1, 32, pT)<32)
{
PanicAlert("%s is not the right size", MasterKeyFileHex);
fclose(pT);
@@ -152,24 +152,24 @@ IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _VolumeType,
fclose(pT);
static char binkey[16];
- char *t=hexkey;
- for(int i=0;i<16;i++)
+ char *t = hexkey;
+ for (int i = 0; i < 16; i++)
{
- char h[3]={*(t++),*(t++),0};
- binkey[i] = (char) strtol(h,NULL,16);
+ char h[3] = {*(t++), *(t++), 0};
+ binkey[i] = (char)strtol(h, NULL, 16);
}
pT = fopen(MasterKeyFile, "wb");
- if(pT==NULL){
+ if (!pT) {
PanicAlert("could not open/make '%s' for writing!", MasterKeyFile);
return NULL;
}
- fwrite(binkey,16,1,pT);
+ fwrite(binkey, 16, 1, pT);
fclose(pT);
pT = fopen(MasterKeyFileHex, "rb");
- if(pT==NULL){
+ if (!pT) {
PanicAlert("could not open '%s' for reading!\n did the file get deleted or locked after converting?", MasterKeyFileHex);
return NULL;
}