summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--makefile1
-rw-r--r--src/frontend/mame/ui/menu.h2
-rw-r--r--src/frontend/mame/ui/widgets.cpp6
-rw-r--r--src/frontend/mame/ui/widgets.h20
-rw-r--r--src/lib/util/corefile.cpp9
5 files changed, 19 insertions, 19 deletions
diff --git a/makefile b/makefile
index 1a8891fb1bd..0f0cca80955 100644
--- a/makefile
+++ b/makefile
@@ -753,6 +753,7 @@ SCRIPTS = scripts/genie.lua \
scripts/src/main.lua \
scripts/src/3rdparty.lua \
scripts/src/cpu.lua \
+ scripts/src/mame/frontend.lua \
scripts/src/osd/modules.lua \
$(wildcard scripts/src/osd/$(OSD)*.lua) \
scripts/src/sound.lua \
diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h
index ab9799371f0..3c74031852d 100644
--- a/src/frontend/mame/ui/menu.h
+++ b/src/frontend/mame/ui/menu.h
@@ -267,7 +267,7 @@ private:
void add_cleanup_callback(cleanup_callback &&callback);
bitmap_argb32 *bgrnd_bitmap() { return m_bgrnd_bitmap.get(); }
- render_texture * bgrnd_texture() { return m_bgrnd_texture.get(); }
+ render_texture *bgrnd_texture() { return m_bgrnd_texture.get(); }
void reset_topmost(reset_options options) { if (m_stack) m_stack->reset(options); }
diff --git a/src/frontend/mame/ui/widgets.cpp b/src/frontend/mame/ui/widgets.cpp
index 3d92bd7c03a..7a82310879e 100644
--- a/src/frontend/mame/ui/widgets.cpp
+++ b/src/frontend/mame/ui/widgets.cpp
@@ -8,9 +8,10 @@
*********************************************************************/
+#include "emu.h"
+
#include "widgets.h"
-#include "rendutil.h"
-#include "drivenum.h"
+
namespace ui {
/***************************************************************************
@@ -26,7 +27,6 @@ widgets_manager::widgets_manager(running_machine &machine)
, m_hilight_texture()
, m_hilight_main_bitmap(std::make_unique<bitmap_argb32>(1, 128))
, m_hilight_main_texture()
- , m_bgrnd_texture()
{
render_manager &render(machine.render());
auto const texture_free([&render](render_texture *texture) { render.texture_free(texture); });
diff --git a/src/frontend/mame/ui/widgets.h b/src/frontend/mame/ui/widgets.h
index 5e9c79f78ba..a18c3a80cc9 100644
--- a/src/frontend/mame/ui/widgets.h
+++ b/src/frontend/mame/ui/widgets.h
@@ -13,12 +13,12 @@
#pragma once
+#include "bitmap.h"
+#include "render.h"
+
#include <memory>
#include <functional>
-#include "ui/ui.h"
-#include "bitmap.h"
-#include "render.h"
namespace ui {
/***************************************************************************
@@ -33,20 +33,18 @@ public:
render_texture *hilight_texture() { return m_hilight_texture.get(); }
render_texture *hilight_main_texture() { return m_hilight_main_texture.get(); }
render_texture *arrow_texture() { return m_arrow_texture.get(); }
- render_texture * bgrnd_texture() { return m_bgrnd_texture.get(); }
using bitmap_ptr = std::unique_ptr<bitmap_argb32>;
using texture_ptr = std::unique_ptr<render_texture, std::function<void(render_texture *)> >;
private:
- bitmap_ptr m_hilight_bitmap;
- texture_ptr m_hilight_texture;
- bitmap_ptr m_hilight_main_bitmap;
- texture_ptr m_hilight_main_texture;
- texture_ptr m_arrow_texture;
- texture_ptr m_bgrnd_texture;
-
static void render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
+
+ bitmap_ptr m_hilight_bitmap;
+ texture_ptr m_hilight_texture;
+ bitmap_ptr m_hilight_main_bitmap;
+ texture_ptr m_hilight_main_texture;
+ texture_ptr m_arrow_texture;
};
} // namespace ui
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index c06426015f7..7a34406cf02 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -18,6 +18,8 @@
#include <algorithm>
#include <cassert>
#include <cstring>
+#include <iterator>
+
#include <ctype.h>
@@ -1279,13 +1281,12 @@ std::string core_filename_extract_base(const std::string &name, bool strip_exten
auto const chop_position = strip_extension
? std::find(name.rbegin(), start, '.')
: start;
- auto const end = (chop_position != start)
- ? chop_position + 1
+ auto const end = ((chop_position != start) && (std::next(chop_position) != start))
+ ? std::next(chop_position)
: name.rbegin();
// copy the result into an string
- std::string result(start.base(), end.base());
- return result;
+ return std::string(start.base(), end.base());
}