Disable CPU selector if only one CPU is available

This commit is contained in:
RichardG867
2020-07-07 16:21:45 -03:00
parent 96750ab75d
commit adb500c63b

View File

@@ -627,7 +627,7 @@ win_settings_machine_recalc_cpu_m(HWND hdlg)
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)lptsTemp); SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)lptsTemp);
c++; c++;
} }
EnableWindow(h, TRUE); EnableWindow(h, (c == 1) ? FALSE : TRUE);
if (temp_cpu >= c) if (temp_cpu >= c)
temp_cpu = (c - 1); temp_cpu = (c - 1);
SendMessage(h, CB_SETCURSEL, temp_cpu, 0); SendMessage(h, CB_SETCURSEL, temp_cpu, 0);