summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
authorGravatarGravatar Vas Crabb <vas@vastheman.com>2019-10-11 20:21:55 +1100
committerGravatarGravatar Vas Crabb <vas@vastheman.com>2019-10-11 20:21:55 +1100
commit67621f11d972d0d24d2ce04ad50d0e60003bf071 (patch)
tree879bad38f1762ffc31c97bbf284a7473a61a899e /src/emu
parentebbe1231857833c38b9661b60bcb357a2c446010 (diff)
(nw) clean up more stuff, mostly leftover from MCFG removal
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/screen.cpp9
-rw-r--r--src/emu/screen.h11
2 files changed, 10 insertions, 10 deletions
diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp
index 835e12995f5..db6f7c91ad4 100644
--- a/src/emu/screen.cpp
+++ b/src/emu/screen.cpp
@@ -546,7 +546,7 @@ screen_device::screen_device(const machine_config &mconfig, const char *tag, dev
, m_scanline_cb(*this)
, m_palette(*this, finder_base::DUMMY_TAG)
, m_video_attributes(0)
- , m_svg_region(tag)
+ , m_svg_region(*this, DEVICE_SELF)
, m_container(nullptr)
, m_width(100)
, m_height(100)
@@ -717,10 +717,9 @@ void screen_device::device_start()
if (m_type == SCREEN_TYPE_SVG)
{
- memory_region *reg = owner()->memregion(m_svg_region);
- if (!reg)
- fatalerror("%s: SVG region \"%s\" does not exist\n", tag(), m_svg_region);
- m_svg = std::make_unique<svg_renderer>(reg);
+ if (!m_svg_region)
+ fatalerror("%s: SVG region \"%s\" does not exist\n", tag(), m_svg_region.finder_tag());
+ m_svg = std::make_unique<svg_renderer>(m_svg_region);
machine().output().set_notifier(nullptr, svg_renderer::output_notifier, m_svg.get());
// don't do this - SVG units are arbitrary and interpreting them as pixels causes bad things to happen
diff --git a/src/emu/screen.h b/src/emu/screen.h
index 87eed6a2738..6754d66f071 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -368,10 +368,11 @@ public:
auto screen_vblank() { return m_screen_vblank.bind(); }
auto scanline() { m_video_attributes |= VIDEO_UPDATE_SCANLINE; return m_scanline_cb.bind(); }
- template<typename T> void set_palette(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); }
- void set_video_attributes(u32 flags) { m_video_attributes = flags; }
- void set_color(rgb_t color) { m_color = color; }
- void set_svg_region(const char *region) { m_svg_region = region; } // default region is device tag
+ template <typename T> screen_device &set_palette(T &&tag) { m_palette.set_tag(std::forward<T>(tag)); return *this; }
+ screen_device &set_no_palette() { m_palette.set_tag(finder_base::DUMMY_TAG); return *this; }
+ screen_device &set_video_attributes(u32 flags) { m_video_attributes = flags; return *this; }
+ screen_device &set_color(rgb_t color) { m_color = color; return *this; }
+ template <typename T> screen_device &set_svg_region(T &&tag) { m_svg_region.set_tag(std::forward<T>(tag)); return *this; } // default region is device tag
// information getters
render_container &container() const { assert(m_container != nullptr); return *m_container; }
@@ -468,7 +469,7 @@ private:
devcb_write32 m_scanline_cb; // screen scanline callback
optional_device<device_palette_interface> m_palette; // our palette
u32 m_video_attributes; // flags describing the video system
- const char * m_svg_region; // the region in which the svg data is in
+ optional_memory_region m_svg_region; // the region in which the svg data is in
// internal state
render_container * m_container; // pointer to our container