Controller Config menu item - disable based on ControllerDefinition having any buttons rather than check for Null Emulator

This commit is contained in:
adelikat 2014-11-30 22:56:02 +00:00
parent 8cffecede9
commit 745b8f555b
2 changed files with 6 additions and 1 deletions

View File

@ -781,7 +781,7 @@ namespace BizHawk.Client.EmuHawk
private void ConfigSubMenu_DropDownOpened(object sender, EventArgs e)
{
ControllersMenuItem.Enabled = !Global.Emulator.IsNull();
ControllersMenuItem.Enabled = Global.Emulator.ControllerDefinition.Any();
}
private void FrameSkipMenuItem_DropDownOpened(object sender, EventArgs e)

View File

@ -162,6 +162,11 @@ namespace BizHawk.Emulation.Common
return 0;
}
}
public virtual bool Any()
{
return BoolButtons.Any() || FloatControls.Any();
}
}
public interface IController