From aae9b331989e3e5b0bcf860301ae4a46099a4c01 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 30 Apr 2017 07:37:31 -0400 Subject: [PATCH] - fixed: Swapping swtruecolor no longer crashes in OpenGL mode after selecting Software in the menu --- src/win32/hardware.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp index 7c3127164..7121738f4 100644 --- a/src/win32/hardware.cpp +++ b/src/win32/hardware.cpp @@ -417,10 +417,13 @@ CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITC { // Strictly speaking this doesn't require a mode switch, but it is the easiest // way to force a CreateFramebuffer call without a lot of refactoring. - NewWidth = screen->GetWidth(); - NewHeight = screen->GetHeight(); - NewBits = DisplayBits; - setmodeneeded = true; + if (currentrenderer == 0) + { + NewWidth = screen->GetWidth(); + NewHeight = screen->GetHeight(); + NewBits = DisplayBits; + setmodeneeded = true; + } } CUSTOM_CVAR (Bool, fullscreen, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)