diff options
author | 2019-03-25 22:44:58 +0100 | |
---|---|---|
committer | 2019-03-25 22:44:58 +0100 | |
commit | c24473ddff715ecec2e258a6eb38960cf8c8e98e (patch) | |
tree | 8ea44b6396a6129913c0aac13859b5de9965e972 /src/frontend/mame/ui/widgets.cpp | |
parent | 009cba4fb8102102168ef32870892438327f3705 (diff) | |
parent | 598cd5227223c3b04ca31f0dbc1981256d9ea3ff (diff) |
conflict resolution (nw)
Diffstat (limited to 'src/frontend/mame/ui/widgets.cpp')
-rw-r--r-- | src/frontend/mame/ui/widgets.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/frontend/mame/ui/widgets.cpp b/src/frontend/mame/ui/widgets.cpp index cc2c276abfc..d8907303b36 100644 --- a/src/frontend/mame/ui/widgets.cpp +++ b/src/frontend/mame/ui/widgets.cpp @@ -14,6 +14,7 @@ namespace ui { + /*************************************************************************** WIDGETS ***************************************************************************/ @@ -24,12 +25,12 @@ namespace ui { widgets_manager::widgets_manager(running_machine &machine) : m_hilight_bitmap(std::make_unique<bitmap_argb32>(256, 1)) - , m_hilight_texture() + , m_hilight_texture(nullptr, machine.render()) , m_hilight_main_bitmap(std::make_unique<bitmap_argb32>(1, 128)) - , m_hilight_main_texture() + , m_hilight_main_texture(nullptr, machine.render()) + , m_arrow_texture(nullptr, machine.render()) { render_manager &render(machine.render()); - auto const texture_free([&render](render_texture *texture) { render.texture_free(texture); }); // create a texture for hilighting items for (unsigned x = 0; x < 256; ++x) @@ -37,7 +38,7 @@ widgets_manager::widgets_manager(running_machine &machine) unsigned const alpha((x < 25) ? (0xff * x / 25) : (x >(256 - 25)) ? (0xff * (255 - x) / 25) : 0xff); m_hilight_bitmap->pix32(0, x) = rgb_t(alpha, 0xff, 0xff, 0xff); } - m_hilight_texture = texture_ptr(render.texture_alloc(), texture_free); + m_hilight_texture.reset(render.texture_alloc()); m_hilight_texture->set_bitmap(*m_hilight_bitmap, m_hilight_bitmap->cliprect(), TEXFORMAT_ARGB32); // create a texture for hilighting items in main menu @@ -50,11 +51,11 @@ widgets_manager::widgets_manager(running_machine &machine) unsigned const b = b1 + (y * (b2 - b1) / 128); m_hilight_main_bitmap->pix32(y, 0) = rgb_t(r, g, b); } - m_hilight_main_texture = texture_ptr(render.texture_alloc(), texture_free); + m_hilight_main_texture.reset(render.texture_alloc()); m_hilight_main_texture->set_bitmap(*m_hilight_main_bitmap, m_hilight_main_bitmap->cliprect(), TEXFORMAT_ARGB32); // create a texture for arrow icons - m_arrow_texture = texture_ptr(render.texture_alloc(render_triangle), texture_free); + m_arrow_texture.reset(render.texture_alloc(render_triangle)); } |