mirror of https://github.com/AxioDL/metaforce.git
Don't clobber the modified flag when unlocking
This commit is contained in:
parent
73b7ba8414
commit
a6076eb5f9
|
@ -458,7 +458,13 @@ void CVar::unlock() {
|
|||
|
||||
void CVar::lock() {
|
||||
if (!isReadOnly() && m_unlocked) {
|
||||
// We want to keep if we've been modified so we can inform our listeners
|
||||
bool modified = True(m_flags & EFlags::Modified);
|
||||
m_flags = m_oldFlags;
|
||||
// If we've been modified insert that back into m_flags
|
||||
if (modified) {
|
||||
m_flags |= EFlags::Modified;
|
||||
}
|
||||
m_unlocked = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue