Add in CDI support in DiscoHawk
(just needed to allow the file to be drag n' dropped)
This commit is contained in:
parent
809523d465
commit
c2297283f4
|
@ -156,7 +156,7 @@
|
|||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(216, 33);
|
||||
this.label3.TabIndex = 7;
|
||||
this.label3.Text = "- Uses FFMPEG for audio decoding\r\n- Loads ISO, CUE, and CCD";
|
||||
this.label3.Text = "- Uses FFMPEG for audio decoding\r\n- Loads ISO, CUE, CCD, and CDI";
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
|
@ -270,7 +270,6 @@
|
|||
this.groupBox2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -278,20 +277,20 @@
|
|||
private System.Windows.Forms.Button ExitButton;
|
||||
private System.Windows.Forms.Panel lblMagicDragArea;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Panel lblMp3ExtractMagicArea;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button btnAbout;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.RadioButton radioButton4;
|
||||
private System.Windows.Forms.ListView lvCompareTargets;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.CheckBox checkEnableOutput;
|
||||
private System.Windows.Forms.Panel lblMp3ExtractMagicArea;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Button btnAbout;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.RadioButton radioButton4;
|
||||
private System.Windows.Forms.ListView lvCompareTargets;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.CheckBox checkEnableOutput;
|
||||
}
|
||||
}
|
|
@ -90,7 +90,7 @@ namespace BizHawk.Client.DiscoHawk
|
|||
|
||||
private void LblMagicDragArea_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
List<string> files = ValidateDrop(e.Data);
|
||||
var files = ValidateDrop(e.Data);
|
||||
e.Effect = files.Count > 0
|
||||
? DragDropEffects.Link
|
||||
: DragDropEffects.None;
|
||||
|
@ -99,14 +99,14 @@ namespace BizHawk.Client.DiscoHawk
|
|||
private static List<string> ValidateDrop(IDataObject ido)
|
||||
{
|
||||
var ret = new List<string>();
|
||||
string[] files = (string[])ido.GetData(DataFormats.FileDrop);
|
||||
if (files == null) return new List<string>();
|
||||
foreach (string str in files)
|
||||
var files = (string[])ido.GetData(DataFormats.FileDrop);
|
||||
if (files == null) return new();
|
||||
foreach (var str in files)
|
||||
{
|
||||
var ext = Path.GetExtension(str) ?? string.Empty;
|
||||
if(!ext.In(".CUE", ".ISO", ".CCD", ".MDS"))
|
||||
if(!ext.In(".CUE", ".ISO", ".CCD", ".CDI", ".MDS"))
|
||||
{
|
||||
return new List<string>();
|
||||
return new();
|
||||
}
|
||||
|
||||
ret.Add(str);
|
||||
|
|
Loading…
Reference in New Issue