diff options
author | 2018-03-11 11:16:58 +0100 | |
---|---|---|
committer | 2018-03-11 11:17:16 +0100 | |
commit | 81a35fb46e22d8efcc19d92ae7b85656b2e36c13 (patch) | |
tree | 92eccca5f0db347c60be7a3c64a0269c3d1c125c /src/emu/crsshair.cpp | |
parent | 1a89b550fa69946a34f5e16e76fc1b18927a495f (diff) |
Remove all uses of first_screen() from core files, nw
Diffstat (limited to 'src/emu/crsshair.cpp')
-rw-r--r-- | src/emu/crsshair.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/emu/crsshair.cpp b/src/emu/crsshair.cpp index f4e69d26d50..11bde091d15 100644 --- a/src/emu/crsshair.cpp +++ b/src/emu/crsshair.cpp @@ -118,7 +118,7 @@ render_crosshair::render_crosshair(running_machine &machine, int player) , m_time(0) { // for now, use the main screen - m_screen = machine.first_screen(); + m_screen = screen_device_iterator(machine.root_device()).first(); } @@ -314,8 +314,9 @@ crosshair_manager::crosshair_manager(running_machine &machine) machine.configuration().config_register("crosshairs", config_load_delegate(&crosshair_manager::config_load, this), config_save_delegate(&crosshair_manager::config_save, this)); /* register the animation callback */ - if (machine.first_screen() != nullptr) - machine.first_screen()->register_vblank_callback(vblank_state_delegate(&crosshair_manager::animate, this)); + screen_device *first_screen = screen_device_iterator(machine.root_device()).first(); + if (first_screen != nullptr) + first_screen->register_vblank_callback(vblank_state_delegate(&crosshair_manager::animate, this)); } /*------------------------------------------------- |