diff options
| author | 2018-03-11 21:26:01 +0100 | |
|---|---|---|
| committer | 2018-03-11 21:26:31 +0100 | |
| commit | 67627369ddb8a0d16898bbcb8e0074d91099d1ee (patch) | |
| tree | 80a92048a4447f8cb6bbb2dc958163d58b0110fe /src/emu/screen.cpp | |
| parent | 2f13e9b3195a05e36514abf20fd2a43172062a70 (diff) | |
Address performance concerns with previous change to screen.h/.cpp, nw
Diffstat (limited to 'src/emu/screen.cpp')
| -rw-r--r-- | src/emu/screen.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp index feb21251f23..b4bdce1f45a 100644 --- a/src/emu/screen.cpp +++ b/src/emu/screen.cpp @@ -792,6 +792,8 @@ void screen_device::device_start() save_item(NAME(m_frame_number)); if (m_oldstyle_vblank_supplied) logerror("%s: Deprecated legacy Old Style screen configured (MCFG_SCREEN_VBLANK_TIME), please use MCFG_SCREEN_RAW_PARAMS instead.\n",this->tag()); + + m_is_primary_screen = (this == screen_device_iterator(machine().root_device()).first()); } @@ -1368,7 +1370,7 @@ void screen_device::vblank_begin() m_vblank_end_time = m_vblank_start_time + attotime(0, m_vblank_period); // if this is the primary screen and we need to update now - if (this == screen_device_iterator(machine().root_device()).first() && !(m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK)) + if (m_is_primary_screen && !(m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK)) machine().video().frame_update(); // call the screen specific callbacks @@ -1400,7 +1402,7 @@ void screen_device::vblank_end() m_screen_vblank(0); // if this is the primary screen and we need to update now - if (this == screen_device_iterator(machine().root_device()).first() && (m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK)) + if (m_is_primary_screen && (m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK)) machine().video().frame_update(); // increment the frame number counter |
