]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Monitor resync blanking delay option.
authorToni Wilen <twilen@winuae.net>
Thu, 28 Apr 2022 18:43:57 +0000 (21:43 +0300)
committerToni Wilen <twilen@winuae.net>
Thu, 28 Apr 2022 18:43:57 +0000 (21:43 +0300)
cfgfile.cpp
include/options.h
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32gfx.cpp
od-win32/win32gui.cpp

index d445abeec69c9030969f5303efa3d4c7be8d7500..b7cb203e490fc192692c2703342ef0df7675459b 100644 (file)
@@ -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;
index 869bf3b4e7b7f991150d27355d1fb81fcd67be04..713f62bc0cfd97c064074a1fea116bf7400b325c 100644 (file)
@@ -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;
index 871eda49d432fc73ed83d02dabcbfde1c482d4fe..4f6ced3acc1f9f335a60b10c11b5389796835d85 100644 (file)
 #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
index 7c8b3804d4ea2244a6698062bde2144dde63c032..4ff714786eb33db5e1fc7e57a43232d5c4316dca 100644 (file)
@@ -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
index f8ce4d65f9a0f5fac0dac1245aea49d461ca8512..09d84c9eb5d193ab124ae3d9c5c4c90fdbfbbc9e 100644 (file)
@@ -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;
index 260d64b66961268e60e78c41c855baac362e9244..cefec5691c4e4fc2e07052be27cbd62e9f05cd53 100644 (file)
@@ -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;