Skip to content

Commit

Permalink
Skin: Fixed issue with FadeDuration
Browse files Browse the repository at this point in the history
  • Loading branch information
brianferguson committed Jul 22, 2024
1 parent 7c05ffe commit a8eb1a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Library/Skin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ void Skin::DoBang(Bang bang, const std::vector<std::wstring>& args)
case Bang::FadeDuration:
{
int duration = m_Parser.ParseInt(args[0].c_str(), 0);
m_NewFadeDuration = duration;
m_NewFadeDuration = max(duration, 0);
}
break;

Expand Down Expand Up @@ -2252,6 +2252,7 @@ void Skin::ReadOptions(ConfigParser& parser, LPCWSTR section, bool isDefault)
if (isDefault) writeDefaultInt(L"AlphaValue", m_AlphaValue);

m_FadeDuration = parser.ReadInt(section, makeKey(L"FadeDuration"), 250);
m_FadeDuration = max(m_FadeDuration, 0);
if (isDefault) writeDefaultInt(L"FadeDuration", m_FadeDuration);

if (!isDefault)
Expand Down

0 comments on commit a8eb1a1

Please sign in to comment.