mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +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();
|
||||
PauseEffect = null;
|
||||
|
||||
if (ActiveEffect is GameModel)
|
||||
Logger.Debug("Finishing change effect with pause");
|
||||
if (ActiveEffect is GameModel || ActiveEffect is ProfilePreviewModel)
|
||||
return;
|
||||
|
||||
// Non-game effects are stored as the new LastEffect.
|
||||
General.Default.LastEffect = ActiveEffect.Name;
|
||||
General.Default.Save();
|
||||
|
||||
Logger.Debug("Finishing change effect with pause");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -116,7 +116,15 @@ namespace Artemis.ViewModels.Abstract
|
||||
else
|
||||
{
|
||||
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
|
||||
MainManager.EffectManager.ClearEffect();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user