private void NewN64PluginSettings_Load(object sender, EventArgs e) { s = GetSettings(); ss = GetSyncSettings(); CoreTypeDropdown.PopulateFromEnum <N64SyncSettings.CoreType>(ss.Core); RspTypeDropdown.PopulateFromEnum <N64SyncSettings.RspType>(ss.Rsp); PluginComboBox.PopulateFromEnum <PluginType>(ss.VideoPlugin); VideoResolutionXTextBox.Text = s.VideoSizeX.ToString(); VideoResolutionYTextBox.Text = s.VideoSizeY.ToString(); var video_setting = s.VideoSizeX + " x " + s.VideoSizeY; var index = VideoResolutionComboBox.Items.IndexOf(video_setting); if (index >= 0) { VideoResolutionComboBox.SelectedIndex = index; } else if (PluginComboBox.SelectedIndex != 4) { VideoResolutionComboBox.SelectedIndex = 13; ShowCustomVideoResolutionControls(); } RicePropertyGrid.SelectedObject = ss.RicePlugin; Glidemk2PropertyGrid.SelectedObject = ss.Glide64mk2Plugin; GlidePropertyGrid.SelectedObject = ss.GlidePlugin; JaboPropertyGrid.SelectedObject = ss.JaboPlugin; }
private void N64VideoPluginConfig_Load(object sender, EventArgs e) { CoreTypeDropdown.PopulateFromEnum(_ss.Core); RspTypeDropdown.PopulateFromEnum(_ss.Rsp); switch (_ss.VideoPlugin) { case PluginType.GlideMk2: PluginComboBox.Text = "Glide64mk2"; break; case PluginType.Glide: PluginComboBox.Text = "Glide64"; break; case PluginType.Rice: PluginComboBox.Text = "Rice"; break; case PluginType.GLideN64: PluginComboBox.Text = "GLideN64"; break; case PluginType.Angrylion: PluginComboBox.Text = "Angrylion"; break; } VideoResolutionXTextBox.Text = _s.VideoSizeX.ToString(); VideoResolutionYTextBox.Text = _s.VideoSizeY.ToString(); var videoSetting = $"{_s.VideoSizeX} x {_s.VideoSizeY}"; var index = VideoResolutionComboBox.Items.IndexOf(videoSetting); if (index >= 0) { VideoResolutionComboBox.SelectedIndex = index; } else if (PluginComboBox.SelectedIndex != 4) // wtf { VideoResolutionComboBox.SelectedIndex = VideoResolutionComboBox.Items.IndexOf(CustomResItemName); ShowCustomVideoResolutionControls(); } RicePropertyGrid.SelectedObject = _ss.RicePlugin; GlidePropertyGrid.SelectedObject = _ss.GlidePlugin; Glide64Mk2PropertyGrid.SelectedObject = _ss.Glide64mk2Plugin; GlideN64PropertyGrid.SelectedObject = _ss.GLideN64Plugin; AngrylionPropertyGrid.SelectedObject = _ss.AngrylionPlugin; }