Revert "Restore threaded renderer on Windows in windowed mode."

This reverts commit 874fa67036.
This commit is contained in:
Pavel Penev
2024-12-11 15:08:36 +02:00
committed by Gustas
parent 48e72c62f3
commit 593c2735ce

View File

@@ -341,7 +341,15 @@ 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), vertexBatchSize, indexBatchSize);
// This is disabled when running in windowed mode on Windows because it breaks the ability to minimize/restore the window.
if (Platform.CurrentPlatform == PlatformType.Windows && windowMode == WindowMode.Windowed)
{
var ctx = new Sdl2GraphicsContext(this);
ctx.InitializeOpenGL();
Context = ctx;
}
else
Context = new ThreadedGraphicsContext(new Sdl2GraphicsContext(this), vertexBatchSize, indexBatchSize);
Context.SetVSyncEnabled(Game.Settings.Graphics.VSync);