discohawk-fix iso handling
This commit is contained in:
parent
2a2caa492c
commit
d1e8bfbd01
|
@ -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>();
|
||||||
}
|
}
|
||||||
|
@ -126,24 +131,24 @@ namespace BizHawk
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lblMp3ExtractMagicArea_DragDrop(object sender, DragEventArgs e)
|
private void lblMp3ExtractMagicArea_DragDrop(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
var files = validateDrop(e.Data);
|
var files = validateDrop(e.Data);
|
||||||
if (files.Count == 0) return;
|
if (files.Count == 0) return;
|
||||||
foreach (var file in files)
|
foreach (var file in files)
|
||||||
{
|
{
|
||||||
using (var disc = Disc.FromCuePath(file, new CueBinPrefs()))
|
using (var disc = Disc.FromCuePath(file, new CueBinPrefs()))
|
||||||
{
|
{
|
||||||
var path = Path.GetDirectoryName(file);
|
var path = Path.GetDirectoryName(file);
|
||||||
var filename = Path.GetFileNameWithoutExtension(file);
|
var filename = Path.GetFileNameWithoutExtension(file);
|
||||||
AudioExtractor.Extract(disc, path, filename);
|
AudioExtractor.Extract(disc, path, filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnAbout_Click(object sender, EventArgs e)
|
private void btnAbout_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
new About().ShowDialog();
|
new About().ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue