discohawk-fix iso handling

This commit is contained in:
zeromus 2012-08-19 18:10:32 +00:00
parent 2a2caa492c
commit d1e8bfbd01
1 changed files with 18 additions and 13 deletions

View File

@ -62,7 +62,12 @@ namespace BizHawk
foreach (var file in files) foreach (var file in files)
{ {
var prefs = GetCuePrefs(); var prefs = GetCuePrefs();
Disc disc = Disc.FromCuePath(file, prefs); string ext = Path.GetExtension(file).ToUpper();
Disc disc = null;
if (ext == ".ISO")
disc = Disc.FromIsoPath(file);
else if(ext == ".CUE")
disc = Disc.FromCuePath(file, prefs);
string baseName = Path.GetFileNameWithoutExtension(file); string baseName = Path.GetFileNameWithoutExtension(file);
baseName += "_hawked"; baseName += "_hawked";
prefs.ReallyDumpBin = true; prefs.ReallyDumpBin = true;
@ -117,7 +122,7 @@ namespace BizHawk
if (files == null) return new List<string>(); if (files == null) return new List<string>();
foreach (string str in files) foreach (string str in files)
{ {
if (Path.GetExtension(str).ToUpper() != ".CUE") if (Path.GetExtension(str).ToUpper() != ".CUE" && Path.GetExtension(str).ToUpper() != ".ISO")
{ {
return new List<string>(); return new List<string>();
} }