diff --git a/src/win/86Box.rc b/src/win/86Box.rc index 99440d661..c2416ace0 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -289,11 +289,7 @@ BEGIN #endif END -#ifdef USE_DYNAREC -DLG_CFG_MACHINE DIALOG DISCARDABLE 97, 0, 267, 114 -#else -DLG_CFG_MACHINE DIALOG DISCARDABLE 97, 0, 267, 99 -#endif +DLG_CFG_MACHINE DIALOG DISCARDABLE 97, 0, 267, 199 STYLE DS_CONTROL | WS_CHILD FONT 9, "Segoe UI" BEGIN @@ -316,13 +312,18 @@ BEGIN 12,12 LTEXT "MB",IDT_1705,123,64,10,10 LTEXT "Memory:",IDT_1706,7,64,30,10 - CONTROL "Enable time sync",IDC_CHECK_SYNC,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,81,102,10 CONTROL "Enable FPU",IDC_CHECK_FPU,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,147,81,113,10 + WS_TABSTOP,7,81,113,10 + GROUPBOX "Time synchronization",IDC_TIME_SYNC,7,96,100,56 + CONTROL "Disabled",IDC_RADIO_TS_DISABLED,"Button", + BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,108,84,10 + CONTROL "Enabled (local time)", IDC_RADIO_TS_LOCAL,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,14,122,84,10 + CONTROL "Enabled (UTC)", IDC_RADIO_TS_UTC,"Button", + BS_AUTORADIOBUTTON | WS_TABSTOP,14,136,84,10 #ifdef USE_DYNAREC CONTROL "Dynamic Recompiler",IDC_CHECK_DYNAREC,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,96,94,10 + BS_AUTOCHECKBOX | WS_TABSTOP,147,81,94,10 #endif END diff --git a/src/win/resource.h b/src/win/resource.h index cbe7a5505..125de4d6e 100644 --- a/src/win/resource.h +++ b/src/win/resource.h @@ -99,7 +99,10 @@ */ #define IDC_SETTINGSCATLIST 1001 /* generic config */ #define IDC_CFILE 1002 /* Select File dialog */ -#define IDC_CHECK_SYNC 1008 +#define IDC_TIME_SYNC 1005 +#define IDC_RADIO_TS_DISABLED 1006 +#define IDC_RADIO_TS_LOCAL 1007 +#define IDC_RADIO_TS_UTC 1008 /* Leave this as is until we finally get into localization in 86Box 3.00(?). */ #if 0 #define IDC_COMBO_LANG 1009 diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 193c82aea..f177a01b8 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -202,7 +202,7 @@ win_settings_init(void) temp_dynarec = cpu_use_dynarec; #endif temp_fpu = enable_external_fpu; - temp_sync = time_sync & TIME_SYNC_ENABLED; + temp_sync = time_sync; /* Video category */ temp_gfxcard = gfxcard; @@ -305,7 +305,7 @@ win_settings_changed(void) i = i || (temp_dynarec != cpu_use_dynarec); #endif i = i || (temp_fpu != enable_external_fpu); - i = i || (temp_sync != (time_sync & TIME_SYNC_ENABLED)); + i = i || (temp_sync != time_sync); /* Video category */ i = i || (gfxcard != temp_gfxcard); @@ -658,8 +658,24 @@ win_settings_machine_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) h2 = GetDlgItem(hdlg, IDC_MEMTEXT); SendMessage(h, UDM_SETBUDDY, (WPARAM)h2, 0); - h=GetDlgItem(hdlg, IDC_CHECK_SYNC); - SendMessage(h, BM_SETCHECK, temp_sync, 0); + if (temp_sync & TIME_SYNC_ENABLED) + { + if (temp_sync & TIME_SYNC_UTC) + { + h=GetDlgItem(hdlg, IDC_RADIO_TS_UTC); + SendMessage(h, BM_SETCHECK, BST_CHECKED, 0); + } + else + { + h=GetDlgItem(hdlg, IDC_RADIO_TS_LOCAL); + SendMessage(h, BM_SETCHECK, BST_CHECKED, 0); + } + } + else + { + h=GetDlgItem(hdlg, IDC_RADIO_TS_DISABLED); + SendMessage(h, BM_SETCHECK, BST_CHECKED, 0); + } win_settings_machine_recalc_machine(hdlg); @@ -713,8 +729,17 @@ win_settings_machine_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) temp_dynarec = SendMessage(h, BM_GETCHECK, 0, 0); #endif - h=GetDlgItem(hdlg, IDC_CHECK_SYNC); - temp_sync = SendMessage(h, BM_GETCHECK, 0, 0); + h=GetDlgItem(hdlg, IDC_RADIO_TS_DISABLED); + if(SendMessage(h, BM_GETCHECK, 0, 0)) + temp_sync = TIME_SYNC_DISABLED; + + h=GetDlgItem(hdlg, IDC_RADIO_TS_LOCAL); + if(SendMessage(h, BM_GETCHECK, 0, 0)) + temp_sync = TIME_SYNC_ENABLED; + + h=GetDlgItem(hdlg, IDC_RADIO_TS_UTC); + if(SendMessage(h, BM_GETCHECK, 0, 0)) + temp_sync = TIME_SYNC_ENABLED | TIME_SYNC_UTC; h=GetDlgItem(hdlg, IDC_CHECK_FPU); temp_fpu = SendMessage(h, BM_GETCHECK, 0, 0);