Make several bits less confusing

This commit is contained in:
Jasmine Iwanek
2022-01-30 19:32:51 -05:00
parent 0613845e16
commit c15244d0c2
3 changed files with 32 additions and 24 deletions

View File

@@ -128,7 +128,7 @@
#define IDC_COMBO_MACHINE 1011 /* machine/cpu config */
#define IDC_CONFIGURE_MACHINE 1012
#define IDC_COMBO_CPU_TYPE 1013
#define IDC_COMBO_CPU 1014
#define IDC_COMBO_CPU_SPEED 1014
#define IDC_COMBO_FPU 1015
#define IDC_COMBO_WS 1016
#ifdef USE_DYNAREC

View File

@@ -47,18 +47,6 @@ BEGIN
WS_BORDER,53,45,166,14
END
DLG_CONFIG DIALOG DISCARDABLE 0, 0, 376, 256
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION STR_CONFIG
FONT FONT_SIZE, FONT_NAME
BEGIN
DEFPUSHBUTTON STR_OK,IDOK,246,235,50,14
PUSHBUTTON STR_CANCEL,IDCANCEL,307,235,50,14
CONTROL "List2",IDC_SETTINGSCATLIST,"SysListView32",LVS_REPORT | LVS_NOCOLUMNHEADER |
LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,7,100,212
CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,1,226,373,1
END
DLG_SPECIFY_DIM DIALOG DISCARDABLE 0, 0, 175, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION STR_SPECIFY_DIM
@@ -80,6 +68,18 @@ BEGIN
PUSHBUTTON STR_CANCEL,IDCANCEL,99,45,50,14
END
DLG_CONFIG DIALOG DISCARDABLE 0, 0, 376, 256
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION STR_CONFIG
FONT FONT_SIZE, FONT_NAME
BEGIN
DEFPUSHBUTTON STR_OK,IDOK,246,235,50,14
PUSHBUTTON STR_CANCEL,IDCANCEL,307,235,50,14
CONTROL "List2",IDC_SETTINGSCATLIST,"SysListView32",LVS_REPORT | LVS_NOCOLUMNHEADER |
LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,7,100,212
CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,1,226,373,1
END
DLG_CFG_MACHINE DIALOG DISCARDABLE 107, 0, 305, 200
STYLE DS_CONTROL | WS_CHILD
FONT FONT_SIZE, FONT_NAME
@@ -87,28 +87,40 @@ BEGIN
COMBOBOX IDC_COMBO_MACHINE_TYPE,71,7,189,120,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT STR_MACHINE_TYPE,IDT_1708,7,9,60,10
COMBOBOX IDC_COMBO_MACHINE,71,26,138,120,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT STR_MACHINE,IDT_1701,7,28,60,10
PUSHBUTTON STR_CONFIGURE,IDC_CONFIGURE_MACHINE,214,26,46,12
COMBOBOX IDC_COMBO_CPU_TYPE,71,45,110,120,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT STR_CPU_TYPE,IDT_1702,7,47,59,10
COMBOBOX IDC_COMBO_CPU,215,45,45,120,CBS_DROPDOWNLIST |
COMBOBOX IDC_COMBO_CPU_SPEED,215,45,45,120,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT STR_SPEED,IDT_1704,189,47,24,10
COMBOBOX IDC_COMBO_FPU,71,64,189,120,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT STR_FPU,IDT_1707,7,66,59,10
COMBOBOX IDC_COMBO_WS,71,83,189,120,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT STR_WAIT_STATES,IDT_1703,7,85,60,10
EDITTEXT IDC_MEMTEXT,70,102,45,12,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_MEMSPIN,"msctls_updown32",UDS_SETBUDDYINT |
UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,113,101,
12,12
LTEXT STR_MB,IDT_1705,123,104,10,10
LTEXT STR_MEMORY,IDT_1706,7,104,30,10
#ifdef USE_DYNAREC
CONTROL STR_DYNAREC,IDC_CHECK_DYNAREC,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,120,120,10
#endif
GROUPBOX STR_TIME_SYNC,IDC_TIME_SYNC,7,135,100,56
CONTROL STR_DISABLED,IDC_RADIO_TS_DISABLED,"Button",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,147,84,10
@@ -116,10 +128,6 @@ BEGIN
BS_AUTORADIOBUTTON | WS_TABSTOP,14,161,84,10
CONTROL STR_ENABLED_UTC, IDC_RADIO_TS_UTC,"Button",
BS_AUTORADIOBUTTON | WS_TABSTOP,14,175,84,10
#ifdef USE_DYNAREC
CONTROL STR_DYNAREC,IDC_CHECK_DYNAREC,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,120,120,10
#endif
END
DLG_CFG_VIDEO DIALOG DISCARDABLE 107, 0, 267, 45

View File

@@ -707,13 +707,13 @@ win_settings_machine_recalc_cpu_m(HWND hdlg)
lptsTemp = (LPTSTR) malloc(512 * sizeof(WCHAR));
settings_reset_content(hdlg, IDC_COMBO_CPU);
settings_reset_content(hdlg, IDC_COMBO_CPU_SPEED);
c = i = 0;
while (temp_cpu_f->cpus[c].cpu_type != 0) {
if (cpu_is_eligible(temp_cpu_f, c, temp_machine)) {
stransi = (char *) temp_cpu_f->cpus[c].name;
mbstowcs(lptsTemp, stransi, strlen(stransi) + 1);
settings_add_string(hdlg, IDC_COMBO_CPU, (LPARAM)(LPCSTR)lptsTemp);
settings_add_string(hdlg, IDC_COMBO_CPU_SPEED, (LPARAM)(LPCSTR)lptsTemp);
if (first_eligible == -1)
first_eligible = i;
@@ -727,13 +727,13 @@ win_settings_machine_recalc_cpu_m(HWND hdlg)
}
if (i == 0)
fatal("No eligible CPUs for the selected family\n");
settings_enable_window(hdlg, IDC_COMBO_CPU, i != 1);
settings_enable_window(hdlg, IDC_COMBO_CPU_SPEED, i != 1);
if (current_eligible < first_eligible)
current_eligible = first_eligible;
else if (current_eligible > last_eligible)
current_eligible = last_eligible;
temp_cpu = listtocpu[current_eligible];
settings_set_cur_sel(hdlg, IDC_COMBO_CPU, current_eligible);
settings_set_cur_sel(hdlg, IDC_COMBO_CPU_SPEED, current_eligible);
win_settings_machine_recalc_cpu(hdlg);
@@ -974,9 +974,9 @@ win_settings_machine_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
win_settings_machine_recalc_cpu_m(hdlg);
}
break;
case IDC_COMBO_CPU:
case IDC_COMBO_CPU_SPEED:
if (HIWORD(wParam) == CBN_SELCHANGE) {
temp_cpu = listtocpu[settings_get_cur_sel(hdlg, IDC_COMBO_CPU)];
temp_cpu = listtocpu[settings_get_cur_sel(hdlg, IDC_COMBO_CPU_SPEED)];
win_settings_machine_recalc_cpu(hdlg);
}
break;