From: Toni Wilen Date: Thu, 28 Apr 2022 18:43:57 +0000 (+0300) Subject: Monitor resync blanking delay option. X-Git-Tag: 41000~248 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=3980fce78ba40db47d1ae408294b242c9e3e1eef;p=francis%2Fwinuae.git Monitor resync blanking delay option. --- diff --git a/cfgfile.cpp b/cfgfile.cpp index d445abee..b7cb203e 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -2291,7 +2291,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_dwrite(f, _T("gfx_frame_slices"), _T("%d"), p->gfx_display_sections); cfgfile_dwrite_bool(f, _T("gfx_vrr_monitor"), p->gfx_variable_sync != 0); cfgfile_dwrite_str(f, _T("gfx_overscanmode"), overscanmodes[p->gfx_overscanmode]); - cfgfile_dwrite(f, _T("gfx_monitorblankdelay"), _T("%d"), p->monitorblankdelay); + cfgfile_dwrite(f, _T("gfx_monitorblankdelay"), _T("%d"), p->gfx_monitorblankdelay); #ifdef GFXFILTER for (int j = 0; j < 2; j++) { @@ -3434,7 +3434,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_floatval(option, value, _T("rtg_horiz_zoom_multf"), &p->rtg_horiz_zoom_mult) || cfgfile_intval(option, value, _T("gfx_horizontal_extra"), &p->gfx_extrawidth, 1) || cfgfile_intval(option, value, _T("gfx_vertical_extra"), &p->gfx_extraheight, 1) - || cfgfile_intval(option, value, _T("gfx_monitorblankdelay"), &p->monitorblankdelay, 1) + || cfgfile_intval(option, value, _T("gfx_monitorblankdelay"), &p->gfx_monitorblankdelay, 1) || cfgfile_intval (option, value, _T("floppy0sound"), &p->floppyslots[0].dfxclick, 1) || cfgfile_intval (option, value, _T("floppy1sound"), &p->floppyslots[1].dfxclick, 1) @@ -8040,7 +8040,7 @@ void default_prefs (struct uae_prefs *p, bool reset, int type) p->clipboard_sharing = false; p->native_code = false; p->lightpen_crosshair = true; - p->monitorblankdelay = 1000; + p->gfx_monitorblankdelay = 0; p->cs_compatible = CP_GENERIC; p->cs_rtc = 2; diff --git a/include/options.h b/include/options.h index 869bf3b4..713f62bc 100644 --- a/include/options.h +++ b/include/options.h @@ -581,6 +581,7 @@ struct uae_prefs { int gfx_variable_sync; bool gfx_windowed_resize; int gfx_overscanmode; + int gfx_monitorblankdelay; struct gfx_filterdata gf[2]; @@ -649,7 +650,6 @@ struct uae_prefs { int uaescsidevmode; bool reset_delay; bool crash_auto_reset; - int monitorblankdelay; int cs_compatible; int cs_ciaatod; diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 871eda49..4f6ced3a 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -512,6 +512,7 @@ #define IDC_GRAYSCALE 1183 #define IDC_OVERSCANMODE 1184 #define IDC_FRAMERATE 1185 +#define IDC_RESYNCBLANK 1186 #define IDC_XSIZE 1187 #define IDC_YSIZE 1188 #define IDC_INPUTAUTOFIRERATE 1188 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 7c8b3804..4ff71478 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -216,6 +216,7 @@ BEGIN CONTROL "Double, frames",IDC_LM_IDOUBLED,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,255,90,10 CONTROL "Double, fields",IDC_LM_IDOUBLED2,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,268,90,10 CONTROL "Double, fields+",IDC_LM_IDOUBLED3,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,281,90,10 + CONTROL "Display resync blanking",IDC_RESYNCBLANK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,155,172,122,10 END IDD_MEMORY DIALOGEX 0, 0, 396, 316 diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index f8ce4d65..09d84c9e 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -2389,6 +2389,7 @@ int check_prefs_changed_gfx (void) c |= currprefs.gfx_scandoubler != changed_prefs.gfx_scandoubler ? (2 | 8) : 0; c |= currprefs.gfx_threebitcolors != changed_prefs.gfx_threebitcolors ? (256) : 0; c |= currprefs.gfx_grayscale != changed_prefs.gfx_grayscale ? (512) : 0; + c |= currprefs.gfx_monitorblankdelay != changed_prefs.gfx_monitorblankdelay ? (512) : 0; c |= currprefs.gfx_display_sections != changed_prefs.gfx_display_sections ? (512) : 0; c |= currprefs.gfx_variable_sync != changed_prefs.gfx_variable_sync ? 1 : 0; @@ -2490,6 +2491,7 @@ int check_prefs_changed_gfx (void) currprefs.gfx_scandoubler = changed_prefs.gfx_scandoubler; currprefs.gfx_threebitcolors = changed_prefs.gfx_threebitcolors; currprefs.gfx_grayscale = changed_prefs.gfx_grayscale; + currprefs.gfx_monitorblankdelay = changed_prefs.gfx_monitorblankdelay; currprefs.gfx_display_sections = changed_prefs.gfx_display_sections; currprefs.gfx_variable_sync = changed_prefs.gfx_variable_sync; diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 260d64b6..cefec569 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -8426,6 +8426,7 @@ static void values_to_displaydlg (HWND hDlg) CheckDlgButton(hDlg, IDC_LORES_SMOOTHED, workprefs.gfx_lores_mode); CheckDlgButton(hDlg, IDC_FLICKERFIXER, workprefs.gfx_scandoubler); CheckDlgButton(hDlg, IDC_GRAYSCALE, workprefs.gfx_grayscale); + CheckDlgButton(hDlg, IDC_RESYNCBLANK, workprefs.gfx_monitorblankdelay > 0); CheckDlgButton (hDlg, IDC_XCENTER, workprefs.gfx_xcenter); CheckDlgButton (hDlg, IDC_YCENTER, workprefs.gfx_ycenter); @@ -8555,6 +8556,7 @@ static void values_from_displaydlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l workprefs.gfx_blackerthanblack = ischecked (hDlg, IDC_BLACKER_THAN_BLACK); workprefs.gfx_autoresolution_vga = ischecked(hDlg, IDC_AUTORESOLUTIONVGA); workprefs.gfx_grayscale = ischecked(hDlg, IDC_GRAYSCALE); + workprefs.gfx_monitorblankdelay = CheckDlgButton(hDlg, IDC_RESYNCBLANK, workprefs.gfx_monitorblankdelay) ? 1000 : 0; int vres = workprefs.gfx_vresolution; int viscan = workprefs.gfx_iscanlines;