1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Plugins - Better disable features on dispose

This commit is contained in:
Robert 2021-08-21 23:58:41 +02:00
parent 6a929cdcc0
commit c08e4a49a3

View File

@ -75,7 +75,8 @@ namespace Artemis.Core
/// </param>
protected virtual void Dispose(bool disposing)
{
if (disposing) InternalDisable();
if (disposing)
SetEnabled(false);
}
/// <summary>
@ -104,16 +105,6 @@ namespace Artemis.Core
Profiler.StopMeasurement("Update");
}
internal void StartRenderMeasure()
{
Profiler.StartMeasurement("Render");
}
internal void StopRenderMeasure()
{
Profiler.StopMeasurement("Render");
}
internal void SetEnabled(bool enable, bool isAutoEnable = false)
{
if (enable == IsEnabled)