Skip to content

Commit aae9b33

Browse files
- fixed: Swapping swtruecolor no longer crashes in OpenGL mode after selecting Software in the menu
1 parent 8a36bf5 commit aae9b33

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/win32/hardware.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,13 @@ CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITC
417417
{
418418
// Strictly speaking this doesn't require a mode switch, but it is the easiest
419419
// way to force a CreateFramebuffer call without a lot of refactoring.
420-
NewWidth = screen->GetWidth();
421-
NewHeight = screen->GetHeight();
422-
NewBits = DisplayBits;
423-
setmodeneeded = true;
420+
if (currentrenderer == 0)
421+
{
422+
NewWidth = screen->GetWidth();
423+
NewHeight = screen->GetHeight();
424+
NewBits = DisplayBits;
425+
setmodeneeded = true;
426+
}
424427
}
425428

426429
CUSTOM_CVAR (Bool, fullscreen, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)

0 commit comments

Comments
 (0)