From c3f0653bfab42ace249d838ce61ab9f5f8d4a4ca Mon Sep 17 00:00:00 2001 From: tomcw Date: Sun, 24 Feb 2019 22:00:14 +0000 Subject: [PATCH] Added cmd line switch to disable vertical blend (#616) --- source/Applewin.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/Applewin.cpp b/source/Applewin.cpp index cb6e64f2..377ec754 100644 --- a/source/Applewin.cpp +++ b/source/Applewin.cpp @@ -1176,7 +1176,8 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int) UINT uRamWorksExPages = 0; UINT uSaturnBanks = 0; int newVideoType = -1; - int newVideoStyle = -1; + int newVideoStyleEnableMask = 0; + int newVideoStyleDisableMask = 0; while (*lpCmdLine) { @@ -1403,7 +1404,11 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int) } else if (strcmp(lpCmdLine, "-video-style=vertical-blend") == 0) // GH#616 { - newVideoStyle = VS_COLOR_VERTICAL_BLEND; + newVideoStyleEnableMask = VS_COLOR_VERTICAL_BLEND; + } + else if (strcmp(lpCmdLine, "-video-style=no-vertical-blend") == 0) // GH#616 + { + newVideoStyleDisableMask = VS_COLOR_VERTICAL_BLEND; } else // unsupported { @@ -1519,8 +1524,7 @@ int APIENTRY WinMain(HINSTANCE passinstance, HINSTANCE, LPSTR lpCmdLine, int) if (newVideoType >= 0) SetVideoType( (VideoType_e)newVideoType ); - if (newVideoStyle >= 0) - SetVideoStyle( (VideoStyle_e)newVideoStyle ); + SetVideoStyle( (VideoStyle_e) ((GetVideoStyle() | newVideoStyleEnableMask) & ~newVideoStyleDisableMask) ); // Apply the memory expansion switches after loading the Apple II machine type #ifdef RAMWORKS