mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
misc fixes (nw)
* remove a temporary * fix deps * remove a vestigial member * play nicer with dotfiles * play nicer with pch
This commit is contained in:
parent
203c8ffbdb
commit
31c4a81369
1
makefile
1
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 \
|
||||
|
@ -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); }
|
||||
|
||||
|
@ -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); });
|
||||
|
@ -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
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user