diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2017-09-15 20:49:44 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2017-09-15 20:50:00 -0400 |
commit | 762925f409ebaed1728d1f1cd1a28e49e0d2ce76 (patch) | |
tree | dd989863afcc4e1ed119703b653abbbe01fbaadf | |
parent | 489d68f57f94d4ac051bb5053ca281fccdb9e816 (diff) |
Eliminate last use of auto_alloc in frontend (nw)
-rw-r--r-- | src/frontend/mame/ui/ui.cpp | 6 | ||||
-rw-r--r-- | src/frontend/mame/ui/ui.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index d81dd884383..b857d613c12 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -181,6 +181,7 @@ mame_ui_manager::mame_ui_manager(running_machine &machine) , m_showfps_end(0) , m_show_profiler(false) , m_popup_text_end(0) + , m_mouse_bitmap(32, 32) , m_mouse_arrow_texture(nullptr) , m_mouse_show(false) {} @@ -208,11 +209,10 @@ void mame_ui_manager::init() machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&mame_ui_manager::exit, this)); // create mouse bitmap - bitmap_argb32 *ui_mouse_bitmap = auto_alloc(machine(), bitmap_argb32(32, 32)); - uint32_t *dst = &ui_mouse_bitmap->pix32(0); + uint32_t *dst = &m_mouse_bitmap.pix32(0); memcpy(dst,mouse_bitmap,32*32*sizeof(uint32_t)); m_mouse_arrow_texture = machine().render().texture_alloc(); - m_mouse_arrow_texture->set_bitmap(*ui_mouse_bitmap, ui_mouse_bitmap->cliprect(), TEXFORMAT_ARGB32); + m_mouse_arrow_texture->set_bitmap(m_mouse_bitmap, m_mouse_bitmap.cliprect(), TEXFORMAT_ARGB32); } diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h index 239190e7a11..b124b471d9c 100644 --- a/src/frontend/mame/ui/ui.h +++ b/src/frontend/mame/ui/ui.h @@ -243,6 +243,7 @@ private: bool m_show_profiler; osd_ticks_t m_popup_text_end; std::unique_ptr<uint8_t[]> m_non_char_keys_down; + bitmap_argb32 m_mouse_bitmap; render_texture * m_mouse_arrow_texture; bool m_mouse_show; ui_options m_ui_options; |