mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed preview not restoring effects when disabling a game
This commit is contained in:
parent
32a651ffec
commit
fa3b2f4792
@ -153,14 +153,13 @@ namespace Artemis.Managers
|
|||||||
_mainManager.Unpause();
|
_mainManager.Unpause();
|
||||||
PauseEffect = null;
|
PauseEffect = null;
|
||||||
|
|
||||||
if (ActiveEffect is GameModel)
|
Logger.Debug("Finishing change effect with pause");
|
||||||
|
if (ActiveEffect is GameModel || ActiveEffect is ProfilePreviewModel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Non-game effects are stored as the new LastEffect.
|
// Non-game effects are stored as the new LastEffect.
|
||||||
General.Default.LastEffect = ActiveEffect.Name;
|
General.Default.LastEffect = ActiveEffect.Name;
|
||||||
General.Default.Save();
|
General.Default.Save();
|
||||||
|
|
||||||
Logger.Debug("Finishing change effect with pause");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -116,7 +116,15 @@ namespace Artemis.ViewModels.Abstract
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_lastEffect != null)
|
if (_lastEffect != null)
|
||||||
MainManager.EffectManager.ChangeEffect(_lastEffect, true);
|
{
|
||||||
|
// Game models are only used if they are enabled
|
||||||
|
var gameModel = _lastEffect as GameModel;
|
||||||
|
if (gameModel != null)
|
||||||
|
if (!gameModel.Enabled)
|
||||||
|
MainManager.EffectManager.GetLastEffect();
|
||||||
|
else
|
||||||
|
MainManager.EffectManager.ChangeEffect(_lastEffect, true);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
MainManager.EffectManager.ClearEffect();
|
MainManager.EffectManager.ClearEffect();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user