From 6adf6c10bbf34a90a0fc1a811f2ec2916b4ba955 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Tue, 1 Mar 2011 04:32:00 +0000 Subject: [PATCH] Input Config Dialog - fix so that initial selection of controller type actually invokes the selected index event so that the dialog is set up to the proper controller. Also make the default (Null emulator) be SMS --- BizHawk.MultiClient/config/InputConfig.cs | 47 +++++++++++------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/BizHawk.MultiClient/config/InputConfig.cs b/BizHawk.MultiClient/config/InputConfig.cs index 934e8f2aeb..4de4016a46 100644 --- a/BizHawk.MultiClient/config/InputConfig.cs +++ b/BizHawk.MultiClient/config/InputConfig.cs @@ -346,32 +346,29 @@ namespace BizHawk.MultiClient } private void InputConfig_Load(object sender, EventArgs e) { - - if (!(Global.Emulator is NullEmulator)) + switch (Global.Game.System) { - switch (Global.Game.System) - { - case "SMS": - case "SG": - case "GG": - this.SystemComboBox.SelectedItem = 0; - break; - case "PCE": - case "SGX": - this.SystemComboBox.SelectedItem = 1; - break; - case "GEN": - this.SystemComboBox.SelectedItem = 2; - break; - case "TI83": - this.SystemComboBox.SelectedItem = 3; - break; - case "GB": - this.SystemComboBox.SelectedItem = 4; - break; - default: - break; - } + case "SMS": + case "SG": + case "GG": + this.SystemComboBox.SelectedIndex = 0; + break; + case "PCE": + case "SGX": + this.SystemComboBox.SelectedIndex = 1; + break; + case "GEN": + this.SystemComboBox.SelectedIndex = 2; + break; + case "TI83": + this.SystemComboBox.SelectedIndex = 3; + break; + case "GB": + this.SystemComboBox.SelectedIndex = 4; + break; + default: + this.SystemComboBox.SelectedIndex = 0; + break; } } private void OK_Click(object sender, EventArgs e)