mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 12:04:38 -04:00
add VGA "porch" behaviour emulation (#811)
This commit is contained in:
parent
e5d9de2cf3
commit
3f6a03263c
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user