foxygit / doom Log in
commit f81c93613de934a49ba60637d5ad3eca142a69a4
Merge: 7e528998 8edbbe8a
Author:     Mike Swanson <mikeonthecomputer@gmail.com>
AuthorDate: Mon Feb 20 12:00:41 2017 -0800
Commit:     Mike Swanson <mikeonthecomputer@gmail.com>
CommitDate: Mon Feb 20 12:00:41 2017 -0800

    Merge remote-tracking branch 'jmtd/gh-832-vga-porch-emu' into sdl2-branch

 src/i_video.c       | 13 +++++++++++++
 src/i_video.h       |  1 +
 src/m_config.c      |  6 ++++++
 src/setup/display.c |  4 ++++
 4 files changed, 24 insertions(+)

diff --cc src/i_video.c
index 28716da3,73707f9a..78bdd751
--- a/src/i_video.c
+++ b/src/i_video.c
@@@ -126,10 -126,10 +126,14 @@@ int fullscreen = true

  int aspect_ratio_correct = true;

 +// Force integer scales for resolution-independent rendering
 +
 +int integer_scaling = false;
 +
+ // VGA Porch palette change emulation
+
+ int vga_porch_flash = false;
+
  // Force software rendering, for systems which lack effective hardware
  // acceleration

@@@ -1399,7 -1401,7 +1411,8 @@@ void I_BindVideoVariables(void
      M_BindIntVariable("fullscreen",                &fullscreen);
      M_BindIntVariable("video_display",             &video_display);
      M_BindIntVariable("aspect_ratio_correct",      &aspect_ratio_correct);
 +    M_BindIntVariable("integer_scaling",           &integer_scaling);
+     M_BindIntVariable("vga_porch_flash",           &vga_porch_flash);
      M_BindIntVariable("startup_delay",             &startup_delay);
      M_BindIntVariable("fullscreen_width",          &fullscreen_width);
      M_BindIntVariable("fullscreen_height",         &fullscreen_height);
diff --cc src/i_video.h
index 59125103,3184bae3..6b052a3d
--- a/src/i_video.h
+++ b/src/i_video.h
@@@ -90,7 -90,7 +90,8 @@@ extern int screen_width
  extern int screen_height;
  extern int fullscreen;
  extern int aspect_ratio_correct;
 +extern int integer_scaling;
+ extern int vga_porch_flash;
  extern int force_software_renderer;

  #endif
diff --cc src/m_config.c
index e74957fa,9bc96782..c056e93c
--- a/src/m_config.c
+++ b/src/m_config.c
@@@ -728,11 -728,12 +728,17 @@@ static default_t extra_defaults_list[]
      CONFIG_VARIABLE_INT(aspect_ratio_correct),

      //!
 +    // If non-zero, forces integer scales for resolution-independent rendering.
 +    //
 +
 +    CONFIG_VARIABLE_INT(integer_scaling),
 +
+     // If non-zero, any pillar/letter boxes drawn around the game area
+     // will "flash" when the game palette changes, simulating the VGA
+     // "porch"
+
+     CONFIG_VARIABLE_INT(vga_porch_flash),
+
      //!
      // Window width when running in windowed mode.
      //
diff --cc src/setup/display.c
index 71921c6f,e9533c89..cde8478a
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@@ -66,7 -66,7 +66,8 @@@ static window_size_t window_sizes_scale
  static char *video_driver = "";
  static char *window_position = "";
  static int aspect_ratio_correct = 1;
 +static int integer_scaling = 0;
+ static int vga_porch_flash = 0;
  static int force_software_renderer = 0;
  static int fullscreen = 1;
  static int fullscreen_width = 0, fullscreen_height = 0;