From 307c5bf485530265a9f772e011f10e92a6c14058 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 20 Jun 2017 23:19:00 +0200 Subject: [PATCH] Fixed the Settings MIDI mess. --- src/WIN/win_settings.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/WIN/win_settings.c b/src/WIN/win_settings.c index f97d09b2c..970ce119a 100644 --- a/src/WIN/win_settings.c +++ b/src/WIN/win_settings.c @@ -1297,7 +1297,6 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa { EnableWindow(h, FALSE); } - EnableWindow(h, mpu401_present() ? TRUE : FALSE); h = GetDlgItem(hdlg, IDC_CHECK_MPU401); SendMessage(h, BM_SETCHECK, temp_mpu401, 0); @@ -1342,8 +1341,12 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa EnableWindow(h, FALSE); } - h = GetDlgItem(hdlg, IDC_COMBO_MIDI); - EnableWindow(h, mpu401_present() ? TRUE : FALSE); + h = GetDlgItem(hdlg, IDC_CHECK_MPU401); + SendMessage(h, BM_SETCHECK, temp_mpu401, 0); + EnableWindow(h, mpu401_standalone_allow() ? TRUE : FALSE); + + h = GetDlgItem(hdlg, IDC_CONFIGURE_MPU401); + EnableWindow(h, (mpu401_standalone_allow() && temp_mpu401) ? TRUE : FALSE); break; case IDC_CONFIGURE_SND: @@ -1367,8 +1370,12 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa EnableWindow(h, FALSE); } - h = GetDlgItem(hdlg, IDC_COMBO_MIDI); - EnableWindow(h, mpu401_present() ? TRUE : FALSE); + h = GetDlgItem(hdlg, IDC_CHECK_MPU401); + SendMessage(h, BM_SETCHECK, temp_mpu401, 0); + EnableWindow(h, mpu401_standalone_allow() ? TRUE : FALSE); + + h = GetDlgItem(hdlg, IDC_CONFIGURE_MPU401); + EnableWindow(h, (mpu401_standalone_allow() && temp_mpu401) ? TRUE : FALSE); break; case IDC_CONFIGURE_MIDI: @@ -1384,9 +1391,6 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa h = GetDlgItem(hdlg, IDC_CONFIGURE_MPU401); EnableWindow(h, mpu401_present() ? TRUE : FALSE); - - h = GetDlgItem(hdlg, IDC_COMBO_MIDI); - EnableWindow(h, mpu401_present() ? TRUE : FALSE); break; case IDC_CONFIGURE_MPU401: