From bf8a3fc881d17f44cdcfdf3639289bef09229c03 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 26 Jan 2024 10:29:00 +0100 Subject: Disable "opengl" by default and remove unused "hwaccel" option Since we now use SDL2, OpenGL is used through the SDL2 API. This appears to work very well and handles resizing better (with less flicker). Our manual OpenGL rendering code is probably obsolete. The "hwaccel" option referred to hardware accelerations supported by SDL1 and is no longer relevant. --- src/client.cpp | 5 ++--- src/defaults.cpp | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index ffea7a8a..986b65fa 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -288,7 +288,7 @@ Client::Client(const Options &options): // Add the local data directory to PhysicsFS search path resman->addToSearchPath(mLocalDataDir, false); - bool useOpenGL = !mOptions.noOpenGL && (config.getValue("opengl", 1) == 1); + bool useOpenGL = !mOptions.noOpenGL && (config.getValue("opengl", 0) == 1); // Set up the transparency option for low CPU when not using OpenGL. if (!useOpenGL && (config.getValue("disableTransparency", 0) == 1)) @@ -1201,8 +1201,7 @@ void Client::initHomeDir() void Client::initConfiguration() { // Fill configuration with defaults - config.setValue("hwaccel", false); - config.setValue("opengl", true); + config.setValue("opengl", false); config.setValue("screen", false); config.setValue("sound", true); config.setValue("guialpha", 0.8f); diff --git a/src/defaults.cpp b/src/defaults.cpp index 2fcca4f8..2cd81cd2 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -78,11 +78,10 @@ DefaultsData* getConfigDefaults() AddDEF(configData, "particleEmitterSkip", 1); AddDEF(configData, "particleeffects", true); AddDEF(configData, "logToStandardOut", false); - AddDEF(configData, "opengl", true); + AddDEF(configData, "opengl", false); AddDEF(configData, "screenwidth", defaultScreenWidth); AddDEF(configData, "screenheight", defaultScreenHeight); AddDEF(configData, "screen", false); - AddDEF(configData, "hwaccel", false); AddDEF(configData, "sound", false); AddDEF(configData, "sfxVolume", 100); AddDEF(configData, "notificationsVolume", 100); -- cgit v1.2.3-70-g09d2