Device visualiser - (probably) Fixed a NaN crash

General UI - Apply change in default render scale everywhere
Plugin settings - Added restart later option when disabling device providers
Plugin settings - Added support for disabling plugins that failed to load
This commit is contained in:
Robert committed 2020-09-03 19:49:48 +02:00
1 parent 20e6aa1135
commit c98fc51623
8 files changed
+84 -26

No files matched your search

+10 -4
View File
@@ -281,6 +281,15 @@ namespace Artemis.Core.Services
{
try
{
// A device provider may be queued for disable on next restart, this undoes that
if (plugin is DeviceProvider && plugin.Enabled && !plugin.PluginInfo.Enabled)
{
plugin.PluginInfo.Enabled = true;
plugin.PluginInfo.ApplyToEntity();
_pluginRepository.SavePlugin(plugin.PluginInfo.PluginEntity);
return;
}
plugin.SetEnabled(true, isAutoEnable);
}
catch (Exception e)
@@ -312,16 +321,13 @@ namespace Artemis.Core.Services
{
_logger.Debug("Disabling plugin {pluginInfo}", plugin.PluginInfo);
// Device providers cannot be disabled at runtime, restart the application
// Device providers cannot be disabled at runtime simply queue a disable for next restart
if (plugin is DeviceProvider)
{
// Don't call SetEnabled(false) but simply update enabled state and save it
plugin.PluginInfo.Enabled = false;
plugin.PluginInfo.ApplyToEntity();
_pluginRepository.SavePlugin(plugin.PluginInfo.PluginEntity);
_logger.Debug("Shutting down for device provider disable {pluginInfo}", plugin.PluginInfo);
ApplicationUtilities.Shutdown(2, true);
return;
}
@@ -24,7 +24,7 @@ namespace Artemis.Core.Services
_rgbService = rgbService;
_pluginService = pluginService;
_surfaceConfigurations = new List<ArtemisSurface>();
_renderScaleSetting = settingsService.GetSetting("Core.RenderScale", 1.0);
_renderScaleSetting = settingsService.GetSetting("Core.RenderScale", 0.5);
LoadFromRepository();