Remove DisableWindowsRenderThread and use threaded renderering for non windowed mode

This commit is contained in:
abcdefg30
2020-03-23 20:23:45 +01:00
committed by Paul Chote
parent 7a1169744e
commit ba7e1319ac
2 changed files with 2 additions and 6 deletions

View File

@@ -179,9 +179,6 @@ namespace OpenRA
[Desc("At which frames per second to cap the framerate.")] [Desc("At which frames per second to cap the framerate.")]
public int MaxFramerate = 60; public int MaxFramerate = 60;
[Desc("Disable separate OpenGL render thread on Windows operating systems.")]
public bool DisableWindowsRenderThread = true;
[Desc("Disable the OpenGL debug message callback feature.")] [Desc("Disable the OpenGL debug message callback feature.")]
public bool DisableGLDebugMessageCallback = false; public bool DisableGLDebugMessageCallback = false;

View File

@@ -288,9 +288,8 @@ namespace OpenRA.Platforms.Default
// Run graphics rendering on a dedicated thread. // Run graphics rendering on a dedicated thread.
// The calling thread will then have more time to process other tasks, since rendering happens in parallel. // The calling thread will then have more time to process other tasks, since rendering happens in parallel.
// If the calling thread is the main game thread, this means it can run more logic and render ticks. // If the calling thread is the main game thread, this means it can run more logic and render ticks.
// This is disabled on Windows because it breaks the ability to minimize/restore the window from the taskbar for reasons that we dont understand. // This is disabled when running in windowed mode on Windows because it breaks the ability to minimize/restore the window.
var threadedRenderer = Platform.CurrentPlatform != PlatformType.Windows || !Game.Settings.Graphics.DisableWindowsRenderThread; if (Platform.CurrentPlatform == PlatformType.Windows && windowMode == WindowMode.Windowed)
if (!threadedRenderer)
{ {
var ctx = new Sdl2GraphicsContext(this); var ctx = new Sdl2GraphicsContext(this);
ctx.InitializeOpenGL(); ctx.InitializeOpenGL();