summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/menu.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-01-19 17:34:43 +1100
committer Vas Crabb <vas@vastheman.com>2019-01-19 17:34:43 +1100
commit9198c2bd58d31310a324ad0180c57e503c630d0f (patch)
tree71e3431c9be2088bf50d5d397f00d7de08bc633e /src/frontend/mame/ui/menu.cpp
parent3174c630780e1e2302f19e308ccdd73b1d3d4b01 (diff)
More UI stuff:
* Split up the different parts of ICO loading in the menus (locating files, scaling, drawing, etc.) * Added icon support to software selection menu * Added support for more ICO file variants, including PNG-in-ICO (new DIB parser is overkill for ICO but I can factor it out for BMP loading at some point) * Added favourites filter for software menus - includes software that's favourited on any system, so GBC includes DMG favourties and vice versa * Eliminated unnecessary member variables and O(n) walks in software selection menu * Made the menus' cached texture structures a bit more efficient
Diffstat (limited to 'src/frontend/mame/ui/menu.cpp')
-rw-r--r--src/frontend/mame/ui/menu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp
index 9a8fb8255e3..4bc6a13d81e 100644
--- a/src/frontend/mame/ui/menu.cpp
+++ b/src/frontend/mame/ui/menu.cpp
@@ -86,14 +86,14 @@ menu::global_state::global_state(running_machine &machine, ui_options const &opt
, m_machine(machine)
, m_cleanup_callbacks()
, m_bgrnd_bitmap()
+ , m_bgrnd_texture(nullptr, machine.render())
, m_stack()
, m_free()
{
render_manager &render(machine.render());
- auto const texture_free([&render](render_texture *texture) { render.texture_free(texture); });
// create a texture for main menu background
- m_bgrnd_texture = texture_ptr(render.texture_alloc(render_texture::hq_scale), texture_free);
+ m_bgrnd_texture.reset(render.texture_alloc(render_texture::hq_scale));
if (options.use_background_image() && (&machine.system() == &GAME_NAME(___empty)))
{
m_bgrnd_bitmap = std::make_unique<bitmap_argb32>(0, 0);