From 1a4cf161689e721a2681124c6be7175bda72ff2c Mon Sep 17 00:00:00 2001
From: Magnus Norddahl <dpjudas@users.noreply.github.com>
Date: Sun, 23 Jul 2017 20:54:03 +0200
Subject: [PATCH] - Fix swtruecolor cvar messing up the chosen video mode

---
 src/posix/cocoa/i_video.mm | 4 ++--
 src/posix/sdl/hardware.cpp | 4 ++--
 src/win32/hardware.cpp     | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm
index ebfa45e3b..e0f1e6c68 100644
--- a/src/posix/cocoa/i_video.mm
+++ b/src/posix/cocoa/i_video.mm
@@ -140,8 +140,8 @@ CUSTOM_CVAR(Bool, swtruecolor, TRUECOLOR_DEFAULT, CVAR_ARCHIVE | CVAR_GLOBALCONF
 	if (currentrenderer == 0)
 	{
 		extern int NewWidth, NewHeight, NewBits, DisplayBits;
-		NewWidth      = screen->GetWidth();
-		NewHeight     = screen->GetHeight();
+		NewWidth      = screen->VideoWidth;
+		NewHeight     = screen->VideoHeight;
 		NewBits       = DisplayBits;
 		setmodeneeded = true;
 	}
diff --git a/src/posix/sdl/hardware.cpp b/src/posix/sdl/hardware.cpp
index 8e5c44cf4..775f50fde 100644
--- a/src/posix/sdl/hardware.cpp
+++ b/src/posix/sdl/hardware.cpp
@@ -325,8 +325,8 @@ CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITC
 	// way to force a CreateFramebuffer call without a lot of refactoring.
 	if (currentrenderer == 0)
 	{
-		NewWidth = screen->GetWidth();
-		NewHeight = screen->GetHeight();
+		NewWidth = screen->VideoWidth;
+		NewHeight = screen->VideoHeight;
 		NewBits = DisplayBits;
 		setmodeneeded = true;
 	}
diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp
index f27c318c4..57abe59f9 100644
--- a/src/win32/hardware.cpp
+++ b/src/win32/hardware.cpp
@@ -425,8 +425,8 @@ CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITC
 	// way to force a CreateFramebuffer call without a lot of refactoring.
 	if (currentrenderer == 0)
 	{
-		NewWidth = screen->GetWidth();
-		NewHeight = screen->GetHeight();
+		NewWidth = screen->VideoWidth;
+		NewHeight = screen->VideoHeight;
 		NewBits = DisplayBits;
 		setmodeneeded = true;
 	}