ZXHawk: Fix Tape and Disk media submenus opening at 0,0
This commit is contained in:
parent
a5fc5ed061
commit
95a68d1497
BizHawk.Client.EmuHawk
|
@ -26,6 +26,7 @@ using BizHawk.Client.ApiHawk;
|
|||
using BizHawk.Emulation.Cores.Computers.Commodore64;
|
||||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||
using BizHawk.Emulation.Cores.Computers.SinclairSpectrum;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
|
@ -2506,6 +2507,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
ZXSpectrumTapesSubMenu.DropDownItems.Clear();
|
||||
|
||||
List<ToolStripMenuItem> items = new List<ToolStripMenuItem>();
|
||||
|
||||
if (Emulator is ZXSpectrum)
|
||||
{
|
||||
var speccy = (ZXSpectrum)Emulator;
|
||||
|
@ -2528,15 +2531,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
speccy._machine.TapeMediaIndex = dummy;
|
||||
};
|
||||
|
||||
ZXSpectrumTapesSubMenu.DropDownItems.Add(menuItem);
|
||||
}
|
||||
items.Add(menuItem);
|
||||
}
|
||||
}
|
||||
|
||||
ZXSpectrumTapesSubMenu.DropDownItems.AddRange(items.ToArray());
|
||||
}
|
||||
|
||||
private void ZXSpectrumDisksSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
ZXSpectrumDisksSubMenu.DropDownItems.Clear();
|
||||
|
||||
List<ToolStripMenuItem> items = new List<ToolStripMenuItem>();
|
||||
|
||||
if (Emulator is ZXSpectrum)
|
||||
{
|
||||
var speccy = (ZXSpectrum)Emulator;
|
||||
|
@ -2559,9 +2566,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
speccy._machine.DiskMediaIndex = dummy;
|
||||
};
|
||||
|
||||
ZXSpectrumDisksSubMenu.DropDownItems.Add(menuItem);
|
||||
items.Add(menuItem);
|
||||
}
|
||||
}
|
||||
|
||||
ZXSpectrumDisksSubMenu.DropDownItems.AddRange(items.ToArray());
|
||||
}
|
||||
|
||||
private void ZXSpectrumExportSnapshotMenuItemMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in New Issue