]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
genlock/grayscale fix.
authorToni Wilen <twilen@winuae.net>
Tue, 26 Feb 2019 17:56:38 +0000 (19:56 +0200)
committerToni Wilen <twilen@winuae.net>
Tue, 26 Feb 2019 17:56:38 +0000 (19:56 +0200)
custom.cpp
drawing.cpp

index 28b1c7945236749cfbfd67367bfda6289d8fec0f..3581a22aa0765b0b52b09c8e7ee5b4b69c6335fb 100644 (file)
@@ -5998,7 +5998,8 @@ static void BPLCON0_Denise (int hpos, uae_u16 v, bool immediate)
                v &= ~0x00F1;
        else if (! (currprefs.chipset_mask & CSMASK_AGA))
                v &= ~0x00B0;
-       v &= ~(0x0200 | 0x0100 | 0x0080 | 0x0020);
+
+       v &= ~((currprefs.cs_color_burst ? 0x0000 : 0x0200) | 0x0100 | 0x0080 | 0x0020);
 #if SPRBORDER
        v |= 1;
 #endif
index d3bb93a3240ecf8594290e15587aaef4c039ad9b..baacf245fe2f08979ae68955a1e46cd64060a308 100644 (file)
@@ -2634,7 +2634,7 @@ void init_row_map(void)
        struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
        static uae_u8 *oldbufmem;
        static int oldheight, oldpitch;
-       static bool oldgenlock;
+       static bool oldgenlock, oldburst;
        int i, j;
 
        if (vidinfo->drawbuffer.height_allocated > max_uae_height) {
@@ -2649,7 +2649,8 @@ void init_row_map(void)
        if (oldbufmem && oldbufmem == vidinfo->drawbuffer.bufmem &&
                oldheight == vidinfo->drawbuffer.height_allocated &&
                oldpitch == vidinfo->drawbuffer.rowbytes &&
-               oldgenlock == init_genlock_data)
+               oldgenlock == init_genlock_data &&
+               oldburst == (row_map_color_burst_buffer ? 1 : 0))
                return;
        xfree(row_map_genlock_buffer);
        row_map_genlock_buffer = NULL;
@@ -2678,6 +2679,7 @@ void init_row_map(void)
        oldheight = vidinfo->drawbuffer.height_allocated;
        oldpitch = vidinfo->drawbuffer.rowbytes;
        oldgenlock = init_genlock_data;
+       oldburst = row_map_color_burst_buffer ? 1 : 0;
 }
 
 static void init_aspect_maps(void)
@@ -4121,7 +4123,7 @@ static void finish_drawing_frame(bool drawlines)
        }
 
        // genlock
-       if (currprefs.genlock_image && !currprefs.monitoremu && !currprefs.cs_color_burst && vidinfo->tempbuffer.bufmem_allocated && currprefs.genlock) {
+       if (currprefs.genlock_image && currprefs.genlock && !currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated) {
                setspecialmonitorpos(&vidinfo->tempbuffer);
                if (init_genlock_data != specialmonitor_need_genlock()) {
                        need_genlock_data = init_genlock_data = specialmonitor_need_genlock();
@@ -4148,7 +4150,8 @@ static void finish_drawing_frame(bool drawlines)
        }
 
        // grayscale
-       if (!currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated && ((!bplcolorburst_field && currprefs.cs_color_burst) || (currprefs.gfx_grayscale))) {
+       if (!currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated &&
+               ((!currprefs.genlock && (!bplcolorburst_field && currprefs.cs_color_burst)) || currprefs.gfx_grayscale)) {
                setspecialmonitorpos(&vidinfo->tempbuffer);
                emulate_grayscale(vb, &vidinfo->tempbuffer);
                vb = vidinfo->outbuffer = &vidinfo->tempbuffer;