From 873fe2b393670e1f13e546b84aa1fd97a60d011f Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Fri, 6 Jul 2018 09:37:25 +0200 Subject: [PATCH] Remove legacy HW acceleration support check & update tooltip --- Configuration/SystemConfig.cs | 16 +++------------- Core/Other/Settings/TabSettingsAdvanced.cs | 10 ++-------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Configuration/SystemConfig.cs b/Configuration/SystemConfig.cs index 881a69a4..15ba5464 100644 --- a/Configuration/SystemConfig.cs +++ b/Configuration/SystemConfig.cs @@ -6,26 +6,16 @@ namespace TweetDuck.Configuration{ sealed class SystemConfig{ private static readonly FileSerializer<SystemConfig> Serializer = new FileSerializer<SystemConfig>(); - - public static readonly bool IsHardwareAccelerationSupported = File.Exists(Path.Combine(Program.ProgramPath, "libEGL.dll")) && - File.Exists(Path.Combine(Program.ProgramPath, "libGLESv2.dll")); - + // CONFIGURATION DATA - - private bool _hardwareAcceleration = true; + + public bool HardwareAcceleration { get; set; } = true; public bool ClearCacheAutomatically { get; set; } = true; public int ClearCacheThreshold { get; set; } = 250; public FormBrowser.ThrottleBehavior ThrottleBehavior { get; set; } = FormBrowser.ThrottleBehavior.Covered; - // SPECIAL PROPERTIES - - public bool HardwareAcceleration{ - get => _hardwareAcceleration && IsHardwareAccelerationSupported; - set => _hardwareAcceleration = value; - } - // END OF CONFIG private readonly string file; diff --git a/Core/Other/Settings/TabSettingsAdvanced.cs b/Core/Other/Settings/TabSettingsAdvanced.cs index 60c39304..ec7ed7b2 100644 --- a/Core/Other/Settings/TabSettingsAdvanced.cs +++ b/Core/Other/Settings/TabSettingsAdvanced.cs @@ -24,7 +24,7 @@ public TabSettingsAdvanced(Action<string> reinjectBrowserCSS){ toolTip.SetToolTip(btnRestart, "Restarts the program using the same command\r\nline arguments that were used at launch."); toolTip.SetToolTip(btnRestartArgs, "Restarts the program with customizable\r\ncommand line arguments."); - toolTip.SetToolTip(checkHardwareAcceleration, "Uses graphics card to improve performance. Disable if you experience\r\nvisual glitches. This option will not be exported in a profile."); + toolTip.SetToolTip(checkHardwareAcceleration, "Uses graphics card to improve performance. Disable if you experience visual glitches, or to save a small amount of RAM."); toolTip.SetToolTip(btnClearCache, "Clearing cache will free up space taken by downloaded images and other resources."); toolTip.SetToolTip(checkClearCacheAuto, "Automatically clears cache when its size exceeds the set threshold. Note that cache can only be cleared when closing TweetDuck."); @@ -34,13 +34,7 @@ public TabSettingsAdvanced(Action<string> reinjectBrowserCSS){ toolTip.SetToolTip(btnEditCefArgs, "Set custom command line arguments for Chromium Embedded Framework."); toolTip.SetToolTip(btnEditCSS, "Set custom CSS for browser and notification windows."); - if (SystemConfig.IsHardwareAccelerationSupported){ - checkHardwareAcceleration.Checked = SysConfig.HardwareAcceleration; - } - else{ - checkHardwareAcceleration.Enabled = false; - checkHardwareAcceleration.Checked = false; - } + checkHardwareAcceleration.Checked = SysConfig.HardwareAcceleration; checkClearCacheAuto.Checked = SysConfig.ClearCacheAutomatically; numClearCacheThreshold.Enabled = checkClearCacheAuto.Checked;