private bool GetBindedButton(Key key, out GameBoyPadButton button) { foreach (var name in Enum.GetValues(typeof(GameBoyPadButton)).Cast <GameBoyPadButton>().Where(x => x != GameBoyPadButton.None)) { var bindedKey = (Key)Properties.Settings.Default["KeyBinding" + name]; if (bindedKey == key) { button = name; return(true); } } button = GameBoyPadButton.A; return(false); }
public void Reset() { _joyP = 0; _pressedButtons = GameBoyPadButton.None; }