mirror of
https://github.com/holub/mame
synced 2025-10-05 16:50:57 +03:00
Minor cleanups (nw)
This commit is contained in:
parent
0ccf16d9ce
commit
60915fea12
@ -547,19 +547,29 @@ private:
|
||||
|
||||
void change_mode(UINT8 mode, int state)
|
||||
{
|
||||
/* sanity check, to ensure that we're not changing fixed modes */
|
||||
// sanity check, to ensure that we're not changing fixed modes
|
||||
assert((mode & m_fixed_mode_mask) == 0);
|
||||
|
||||
if (!m_dirty)
|
||||
{
|
||||
video_flush();
|
||||
m_dirty = true;
|
||||
}
|
||||
|
||||
// calculate new mode
|
||||
UINT8 new_mode;
|
||||
if (state)
|
||||
m_mode |= mode;
|
||||
new_mode = m_mode | mode;
|
||||
else
|
||||
m_mode &= ~mode;
|
||||
new_mode = m_mode & ~mode;
|
||||
|
||||
// has the mode changed?
|
||||
if (new_mode != m_mode)
|
||||
{
|
||||
// it has! check dirty flag
|
||||
if (!m_dirty)
|
||||
{
|
||||
video_flush();
|
||||
m_dirty = true;
|
||||
}
|
||||
|
||||
// and set the new mode
|
||||
m_mode = new_mode;
|
||||
}
|
||||
}
|
||||
|
||||
// setup functions
|
||||
|
Loading…
Reference in New Issue
Block a user