]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Removed single buffer option.
authorToni Wilen <twilen@winuae.net>
Tue, 15 May 2018 17:19:15 +0000 (20:19 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 15 May 2018 17:19:15 +0000 (20:19 +0300)
main.cpp
od-win32/win32gui.cpp

index f8224b0af3dd0fe8b9076529442d37eb19dfd828..567b0479f5a77c8c2fbe9594ea3030bff8d6059c 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -173,6 +173,8 @@ void fixup_prefs_dimensions (struct uae_prefs *prefs)
 
        for (int i = 0; i < 2; i++) {
                struct apmode *ap = &prefs->gfx_apmode[i];
+               if (ap->gfx_backbuffers < 1)
+                       ap->gfx_backbuffers = 1;
                ap->gfx_vflip = 0;
                ap->gfx_strobo = false;
                if (ap->gfx_vsync) {
@@ -182,8 +184,6 @@ void fixup_prefs_dimensions (struct uae_prefs *prefs)
                        } else {
                                // legacy vsync: always wait for flip
                                ap->gfx_vflip = -1;
-                               if (prefs->gfx_api && ap->gfx_backbuffers < 1)
-                                       ap->gfx_backbuffers = 1;
                                if (ap->gfx_vflip)
                                        ap->gfx_strobo = prefs->lightboost_strobo;
                        }
index 92d30db03da424736fc74e780e2a8dd7658d8e81..f95dbef68df014c847e534af646abeb9e35aeda3 100644 (file)
@@ -7406,13 +7406,15 @@ static void values_to_displaydlg (HWND hDlg)
        CheckDlgButton (hDlg, IDC_YCENTER, workprefs.gfx_ycenter);
 
        SendDlgItemMessage(hDlg, IDC_DISPLAY_BUFFERCNT, CB_RESETCONTENT, 0, 0);
+#if 0
        WIN32GUI_LoadUIString(IDS_BUFFER_SINGLE, buffer, sizeof buffer / sizeof (TCHAR));
        SendDlgItemMessage(hDlg, IDC_DISPLAY_BUFFERCNT, CB_ADDSTRING, 0, (LPARAM)buffer);
+#endif
        WIN32GUI_LoadUIString(IDS_BUFFER_DOUBLE, buffer, sizeof buffer / sizeof (TCHAR));
        SendDlgItemMessage(hDlg, IDC_DISPLAY_BUFFERCNT, CB_ADDSTRING, 0, (LPARAM)buffer);
        WIN32GUI_LoadUIString(IDS_BUFFER_TRIPLE, buffer, sizeof buffer / sizeof (TCHAR));
        SendDlgItemMessage(hDlg, IDC_DISPLAY_BUFFERCNT, CB_ADDSTRING, 0, (LPARAM)buffer);
-       SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_SETCURSEL, workprefs.gfx_apmode[0].gfx_backbuffers, 0);
+       SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_SETCURSEL, workprefs.gfx_apmode[0].gfx_backbuffers - 1, 0);
 
        CheckDlgButton(hDlg, IDC_DISPLAY_VARSYNC, workprefs.gfx_variable_sync != 0);
 
@@ -7552,7 +7554,7 @@ static void values_from_displaydlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
                CheckRadioButton (hDlg, IDC_LM_INORMAL, IDC_LM_IDOUBLED3, IDC_LM_INORMAL + (workprefs.gfx_iscanlines ? workprefs.gfx_iscanlines + 1: (workprefs.gfx_vresolution ? 1 : 0)));
        }
 
-       workprefs.gfx_apmode[0].gfx_backbuffers = SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_GETCURSEL, 0, 0);
+       workprefs.gfx_apmode[0].gfx_backbuffers = SendDlgItemMessage (hDlg, IDC_DISPLAY_BUFFERCNT, CB_GETCURSEL, 0, 0) + 1;
        workprefs.gfx_framerate = SendDlgItemMessage (hDlg, IDC_FRAMERATE, TBM_GETPOS, 0, 0);
 
        i = SendDlgItemMessage (hDlg, IDC_SCREENMODE_NATIVE2, CB_GETCURSEL, 0, 0);