]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
GUI CPU idle value.
authorToni Wilen <twilen@winuae.net>
Sat, 20 Feb 2021 16:21:38 +0000 (18:21 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 20 Feb 2021 16:21:38 +0000 (18:21 +0200)
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32gui.cpp

index 3396bafb512a53d548b924dcbf9e9a1f5f137cdf..e728965aa0f5f042d8a21cfc3415ac3e9e12a9a4 100644 (file)
 #define IDC_CPUTEXT_x86                 1510
 #define IDC_SCREENRESTEXT               1511
 #define IDC_MAPDRIVES_AUTO              1511
+#define IDC_CPUTEXT2                    1511
+#define IDC_CPUIDLETEXT                 1511
 #define IDC_WIDTHTEXT                   1512
 #define IDC_WINDOWEDTEXT                1512
 #define IDC_MAPDRIVES_LIMIT             1512
index bbeefba0088e936841cbce04f2be83c7f11b82e8..9a3fea1f36a961353124ac14d8dc60efa9d6e2f4 100644 (file)
@@ -297,11 +297,11 @@ BEGIN
     CONTROL         "Fastest possible",IDC_CS_HOST,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,143,19,195,10
     CONTROL         "Approximate A500/A1200 or cycle-exact",IDC_CS_68000,
                     "Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,143,33,195,10
-    CONTROL         "Slider1",IDC_SPEED,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,142,50,192,20
-    RTEXT           "CPU Speed",IDC_STATIC,141,77,55,9,SS_CENTERIMAGE
-    EDITTEXT        IDC_CPUTEXT,204,76,30,12,ES_CENTER | ES_READONLY
-    RTEXT           "CPU Idle",IDC_STATIC,239,77,62,9
-    CONTROL         "",IDC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,308,72,69,21
+    CONTROL         "Slider1",IDC_SPEED,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,142,50,205,20
+    RTEXT           "CPU Speed",IDC_STATIC,141,77,46,9,SS_CENTERIMAGE
+    EDITTEXT        IDC_CPUTEXT,194,75,30,12,ES_CENTER | ES_READONLY
+    RTEXT           "CPU Idle",IDC_STATIC,230,77,41,9
+    CONTROL         "",IDC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,278,72,69,21
     GROUPBOX        "Cycle-exact CPU Emulation Speed",IDC_STATIC,136,100,258,42
     RTEXT           "CPU Frequency",IDC_STATIC,139,121,67,10,SS_CENTERIMAGE
     COMBOBOX        IDC_CPU_FREQUENCY,215,120,89,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@@ -330,6 +330,7 @@ BEGIN
                     "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,123,119,12
     COMBOBOX        IDC_FPU_MODE,7,299,112,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     CONTROL         "Catch unexpected exceptions",IDC_JITCRASH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,143,300,115,11
+    EDITTEXT        IDC_CPUIDLETEXT,356,75,30,12,ES_CENTER | ES_READONLY
 END
 
 IDD_FLOPPY DIALOGEX 0, 0, 396, 316
index b5ffdddb7db292d883cc98602b8927e29352d411..504bbb871d22c3db0cbc5020d00570181b44f40b 100644 (file)
@@ -12707,8 +12707,8 @@ static void values_to_cpudlg(HWND hDlg, WPARAM wParam)
 
        SendDlgItemMessage (hDlg, IDC_SPEED, TBM_SETPOS, TRUE, (int)(workprefs.m68k_speed_throttle / 100));
        _stprintf (buffer, _T("%+d%%"), (int)(workprefs.m68k_speed_throttle / 10));
-
        SetDlgItemText (hDlg, IDC_CPUTEXT, buffer);
+
        CheckDlgButton (hDlg, IDC_COMPATIBLE, workprefs.cpu_compatible);
        CheckDlgButton (hDlg, IDC_COMPATIBLE24, workprefs.address_space_24);
        CheckDlgButton (hDlg, IDC_CPUDATACACHE, workprefs.cpu_data_cache);
@@ -12717,6 +12717,8 @@ static void values_to_cpudlg(HWND hDlg, WPARAM wParam)
        SendDlgItemMessage(hDlg, IDC_FPU_MODE, CB_SETCURSEL, workprefs.fpu_mode < 0 ? 1 : (workprefs.fpu_mode > 0 ? 2 : 0), 0);
        CheckDlgButton (hDlg, IDC_CPU_UNIMPLEMENTED, !workprefs.int_no_unimplemented || workprefs.cachesize);
        SendDlgItemMessage (hDlg, IDC_CPUIDLE, TBM_SETPOS, TRUE, workprefs.cpu_idle == 0 ? 0 : 12 - workprefs.cpu_idle / 15);
+       _stprintf(buffer, _T("%d%%"), (workprefs.cpu_idle == 0 ? 0 : 12 - workprefs.cpu_idle / 15) * 10);
+       SetDlgItemText(hDlg, IDC_CPUIDLETEXT, buffer);
        SendDlgItemMessage (hDlg, IDC_PPC_CPUIDLE, TBM_SETPOS, TRUE, workprefs.ppc_cpu_idle);
        cpu = (workprefs.cpu_model - 68000) / 10;
        if (cpu >= 5)