diff --git a/src/i_video.c b/src/i_video.c index a23a2a48..83dcd86f 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -884,6 +884,7 @@ static int actualheight; int uncapped; // [FG] uncapped rendering frame rate int integer_scaling; // [FG] force integer scales +int vga_porch_flash; // emulate VGA "porch" behaviour int fps; // [FG] FPS counter widget int widescreen; // widescreen mode @@ -1111,6 +1112,15 @@ void I_SetPalette(byte *palette) } SDL_SetPaletteColors(sdlscreen->format->palette, colors, 0, 256); + + if (vga_porch_flash) + { + // "flash" the pillars/letterboxes with palette changes, + // emulating VGA "porch" behaviour + SDL_SetRenderDrawColor(renderer, + colors[0].r, colors[0].g, colors[0].b, + SDL_ALPHA_OPAQUE); + } } // Taken from Chocolate Doom chocolate-doom/src/i_video.c:L841-867 diff --git a/src/i_video.h b/src/i_video.h index 0f0a07e0..89a81625 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -81,6 +81,7 @@ extern int hires; // killough 11/98 extern int useaspect; extern int uncapped; // [FG] uncapped rendering frame rate extern int integer_scaling; // [FG] force integer scales +extern int vga_porch_flash; // emulate VGA "porch" behaviour extern int widescreen; // widescreen mode extern int video_display; // display index extern int window_width, window_height; diff --git a/src/m_misc.c b/src/m_misc.c index 502141ae..f3db21c7 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -2344,6 +2344,13 @@ default_t defaults[] = { "1 to force integer scales" }, + { + "vga_porch_flash", + (config_t *) &vga_porch_flash, NULL, + {0}, {0, 1}, number, ss_none, wad_no, + "1 to emulate VGA \"porch\" behaviour" + }, + // widescreen mode { "widescreen",