Disable the threaded renderer on Windows.
A DisableWindowsRenderThread graphics setting is added to allow players to optionally reenable it.
This commit is contained in:
@@ -187,7 +187,16 @@ namespace OpenRA.Platforms.Default
|
||||
// Run graphics rendering on a dedicated thread.
|
||||
// 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.
|
||||
context = new ThreadedGraphicsContext(new Sdl2GraphicsContext(this), batchSize);
|
||||
// This is disabled on Windows because it breaks the ability to minimize/restore the window from the taskbar for reasons that we dont understand.
|
||||
var threadedRenderer = Platform.CurrentPlatform != PlatformType.Windows || !Game.Settings.Graphics.DisableWindowsRenderThread;
|
||||
if (threadedRenderer)
|
||||
{
|
||||
var ctx = new Sdl2GraphicsContext(this);
|
||||
ctx.InitializeOpenGL();
|
||||
context = ctx;
|
||||
}
|
||||
else
|
||||
context = new ThreadedGraphicsContext(new Sdl2GraphicsContext(this), batchSize);
|
||||
|
||||
SDL.SDL_SetModState(SDL.SDL_Keymod.KMOD_NONE);
|
||||
input = new Sdl2Input();
|
||||
|
||||
Reference in New Issue
Block a user