From dc020c01b4cef869aab3312dad96f23e4e7ce6b7 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 15 May 2018 20:19:15 +0300 Subject: [PATCH] Removed single buffer option. --- main.cpp | 4 ++-- od-win32/win32gui.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index f8224b0a..567b0479 100644 --- 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; } diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 92d30db0..f95dbef6 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -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); -- 2.47.3