summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-04-25 20:09:51 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-04-25 20:09:51 -0400
commit596678f2cd1b40c456db8f278a7f652c2a37da84 (patch)
treea4ffbdf51889f7a63ea7dc3da3afee4535987030 /src/frontend
parentec2669cacff2ec954ba351e09ba083c4e32b4ce4 (diff)
parente8326cdc3267591b635f4f97e5255e031ba6b834 (diff)
Merge remote-tracking branch 'upstream/master' into firstrun
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/cheat.cpp4
-rw-r--r--src/frontend/mame/info.cpp7
-rw-r--r--src/frontend/mame/luaengine.cpp4
-rw-r--r--src/frontend/mame/mame.cpp11
-rw-r--r--src/frontend/mame/mame.h3
-rw-r--r--src/frontend/mame/pluginopts.cpp5
-rw-r--r--src/frontend/mame/ui/cheatopt.cpp2
-rw-r--r--src/frontend/mame/ui/custmenu.cpp4
-rw-r--r--src/frontend/mame/ui/custui.cpp6
-rw-r--r--src/frontend/mame/ui/datfile.cpp8
-rw-r--r--src/frontend/mame/ui/datmenu.cpp1
-rw-r--r--src/frontend/mame/ui/icorender.h2
-rw-r--r--src/frontend/mame/ui/imgcntrl.cpp3
-rw-r--r--src/frontend/mame/ui/mainmenu.cpp2
-rw-r--r--src/frontend/mame/ui/menu.cpp12
-rw-r--r--src/frontend/mame/ui/miscmenu.cpp3
-rw-r--r--src/frontend/mame/ui/optsmenu.cpp5
-rw-r--r--src/frontend/mame/ui/pluginopt.cpp2
-rw-r--r--src/frontend/mame/ui/selgame.cpp17
-rw-r--r--src/frontend/mame/ui/simpleselgame.cpp1
-rw-r--r--src/frontend/mame/ui/sliders.cpp1
-rw-r--r--src/frontend/mame/ui/submenu.cpp4
-rw-r--r--src/frontend/mame/ui/ui.cpp29
-rw-r--r--src/frontend/mame/ui/viewgfx.cpp2
24 files changed, 67 insertions, 71 deletions
diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp
index 099e6344d59..2c48e8c6375 100644
--- a/src/frontend/mame/cheat.cpp
+++ b/src/frontend/mame/cheat.cpp
@@ -142,7 +142,7 @@ cheat_parameter::cheat_parameter(cheat_manager &manager, symbol_table &symbols,
// iterate over items
for (xml_data_node *itemnode = xml_get_sibling(paramnode.child, "item"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "item"))
{
- // check for NULL text
+ // check for nullptr text
if (itemnode->value == nullptr || itemnode->value[0] == 0)
throw emu_fatalerror("%s.xml(%d): item is missing text\n", filename, itemnode->line);
@@ -705,7 +705,7 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
xml_data_node *commentnode = xml_get_sibling(cheatnode.child, "comment");
if (commentnode != nullptr)
{
- // set the value if not NULL
+ // set the value if not nullptr
if (commentnode->value != nullptr && commentnode->value[0] != 0)
m_comment.assign(commentnode->value);
diff --git a/src/frontend/mame/info.cpp b/src/frontend/mame/info.cpp
index 6f5e65d10fb..b23c8296992 100644
--- a/src/frontend/mame/info.cpp
+++ b/src/frontend/mame/info.cpp
@@ -10,7 +10,6 @@
#include "emu.h"
#include "mame.h"
-#include "emuopts.h"
#include "mameopts.h"
#include "machine/ram.h"
#include "sound/samples.h"
@@ -854,6 +853,8 @@ void info_xml_creator::output_input(const ioport_list &portlist)
CTRL_P6,
CTRL_P7,
CTRL_P8,
+ CTRL_P9,
+ CTRL_P10,
CTRL_PCOUNT
};
@@ -1103,6 +1104,10 @@ void info_xml_creator::output_input(const ioport_list &portlist)
case IPT_COIN6:
case IPT_COIN7:
case IPT_COIN8:
+ case IPT_COIN9:
+ case IPT_COIN10:
+ case IPT_COIN11:
+ case IPT_COIN12:
ncoin = MAX(ncoin, field.type() - IPT_COIN1 + 1);
break;
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 1e4f58ef08f..72c36e3bd47 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -40,7 +40,7 @@
#define lua_readline(b,p) \
(fputs(p, stdout), fflush(stdout), /* show prompt */ \
- fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */
+ fgets(b, LUA_MAXINPUT, stdin) != nullptr) /* get line */
static lua_State *globalL = nullptr;
@@ -1669,7 +1669,7 @@ static void *serve_lua(void *param)
{
lua_engine *engine = (lua_engine *)param;
engine->serve_lua();
- return NULL;
+ return nullptr;
}
//-------------------------------------------------
diff --git a/src/frontend/mame/mame.cpp b/src/frontend/mame/mame.cpp
index ac6610a8ab8..c162e5ff12a 100644
--- a/src/frontend/mame/mame.cpp
+++ b/src/frontend/mame/mame.cpp
@@ -53,7 +53,8 @@ mame_machine_manager::mame_machine_manager(emu_options &options,osd_interface &o
m_plugins(std::make_unique<plugin_options>()),
m_lua(global_alloc(lua_engine)),
m_new_driver_pending(nullptr),
- m_firstrun(true)
+ m_firstrun(true),
+ m_autoboot_timer(nullptr)
{
}
@@ -274,8 +275,6 @@ ui_manager* mame_machine_manager::create_ui(running_machine& machine)
m_inifile = std::make_unique<inifile_manager>(machine);
m_ui->set_startup_text("Initializing...", true);
- // set up the cheat engine
- m_cheat = std::make_unique<cheat_manager>(machine);
// allocate autoboot timer
m_autoboot_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(mame_machine_manager::autoboot_callback), this));
@@ -289,6 +288,12 @@ ui_manager* mame_machine_manager::create_ui(running_machine& machine)
return m_ui.get();
}
+void mame_machine_manager::create_custom(running_machine& machine)
+{
+ // set up the cheat engine
+ m_cheat = std::make_unique<cheat_manager>(machine);
+}
+
void mame_machine_manager::ui_initialize(running_machine& machine)
{
m_ui->initialize(machine);
diff --git a/src/frontend/mame/mame.h b/src/frontend/mame/mame.h
index 2de8f8d4876..8cf1a29d50b 100644
--- a/src/frontend/mame/mame.h
+++ b/src/frontend/mame/mame.h
@@ -51,6 +51,9 @@ public:
TIMER_CALLBACK_MEMBER(autoboot_callback);
virtual ui_manager* create_ui(running_machine& machine) override;
+
+ virtual void create_custom(running_machine& machine) override;
+
virtual void ui_initialize(running_machine& machine) override;
/* execute as configured by the OPTION_SYSTEMNAME option on the specified options */
diff --git a/src/frontend/mame/pluginopts.cpp b/src/frontend/mame/pluginopts.cpp
index 90b4b138cab..e56a72dfced 100644
--- a/src/frontend/mame/pluginopts.cpp
+++ b/src/frontend/mame/pluginopts.cpp
@@ -14,7 +14,6 @@
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#include <rapidjson/istreamwrapper.h>
-#include <fstream>
//**************************************************************************
// PLUGIN OPTIONS
@@ -66,7 +65,7 @@ void plugin_options::parse_json(std::string path)
if (document["plugin"].IsObject())
{
- std::string name = document["plugin"]["name"].GetString();
+ std::string plugin_name = document["plugin"]["name"].GetString();
std::string description = document["plugin"]["description"].GetString();
std::string type = document["plugin"]["type"].GetString();
bool start = false;
@@ -75,7 +74,7 @@ void plugin_options::parse_json(std::string path)
if (type=="plugin")
{
- add_entry(core_strdup(name.c_str()),core_strdup(description.c_str()), OPTION_BOOLEAN, start ? "1" : "0");
+ add_entry(core_strdup(plugin_name.c_str()),core_strdup(description.c_str()), OPTION_BOOLEAN, start ? "1" : "0");
}
}
diff --git a/src/frontend/mame/ui/cheatopt.cpp b/src/frontend/mame/ui/cheatopt.cpp
index 8d84c06d759..18fe17f93e4 100644
--- a/src/frontend/mame/ui/cheatopt.cpp
+++ b/src/frontend/mame/ui/cheatopt.cpp
@@ -156,7 +156,7 @@ ui_menu_cheat::~ui_menu_cheat()
menu
-------------------------------------------------*/
-ui_menu_autofire::ui_menu_autofire(running_machine &machine, render_container *container) : ui_menu(machine, container)
+ui_menu_autofire::ui_menu_autofire(running_machine &machine, render_container *container) : ui_menu(machine, container), last_toggle(false)
{
const screen_device *screen = machine.first_screen();
diff --git a/src/frontend/mame/ui/custmenu.cpp b/src/frontend/mame/ui/custmenu.cpp
index e1d6ed470ca..618b16285cd 100644
--- a/src/frontend/mame/ui/custmenu.cpp
+++ b/src/frontend/mame/ui/custmenu.cpp
@@ -84,14 +84,14 @@ void ui_menu_custom_filter::handle()
{
custfltr::other[pos]--;
for ( ; custfltr::other[pos] > FILTER_UNAVAILABLE && (custfltr::other[pos] == FILTER_CATEGORY
- || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]--) ;
+ || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]--) { };
changed = true;
}
else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::other[pos] < FILTER_LAST - 1)
{
custfltr::other[pos]++;
for ( ; custfltr::other[pos] < FILTER_LAST && (custfltr::other[pos] == FILTER_CATEGORY
- || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]++) ;
+ || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]++) { };
changed = true;
}
else if (m_event->iptkey == IPT_UI_SELECT)
diff --git a/src/frontend/mame/ui/custui.cpp b/src/frontend/mame/ui/custui.cpp
index eb0e755d240..78818f33cf8 100644
--- a/src/frontend/mame/ui/custui.cpp
+++ b/src/frontend/mame/ui/custui.cpp
@@ -216,13 +216,13 @@ ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *con
for (ui_options::entry &f_entry : moptions)
{
- const char *name = f_entry.name();
- if (name && strlen(name) && !strcmp(OPTION_INFOS_SIZE, f_entry.name()))
+ const char *entry_name = f_entry.name();
+ if (entry_name && strlen(entry_name) && !strcmp(OPTION_INFOS_SIZE, f_entry.name()))
{
m_info_max = atof(f_entry.maximum());
m_info_min = atof(f_entry.minimum());
}
- else if (name && strlen(name) && !strcmp(OPTION_FONT_ROWS, f_entry.name()))
+ else if (entry_name && strlen(entry_name) && !strcmp(OPTION_FONT_ROWS, f_entry.name()))
{
m_font_max = atof(f_entry.maximum());
m_font_min = atof(f_entry.minimum());
diff --git a/src/frontend/mame/ui/datfile.cpp b/src/frontend/mame/ui/datfile.cpp
index 1e2ca1d6938..2264a421b9e 100644
--- a/src/frontend/mame/ui/datfile.cpp
+++ b/src/frontend/mame/ui/datfile.cpp
@@ -530,19 +530,19 @@ int datfile_manager::index_datafile(dataindex &index, int &swcount)
while (cpoint < cends)
{
// search for comma
- size_t found = s_roms.find(",", cpoint);
+ size_t comma_found = s_roms.find(",", cpoint);
// found it
- if (found != std::string::npos)
+ if (comma_found != std::string::npos)
{
// copy data
- name = s_roms.substr(cpoint, found - cpoint);
+ name = s_roms.substr(cpoint, comma_found - cpoint);
// add a SoftwareItem
m_swindex[lname].emplace(name, ftell(fp));
// update current point
- cpoint = ++found;
+ cpoint = ++comma_found;
swcount++;
}
else
diff --git a/src/frontend/mame/ui/datmenu.cpp b/src/frontend/mame/ui/datmenu.cpp
index 7e90e11178d..188e938acff 100644
--- a/src/frontend/mame/ui/datmenu.cpp
+++ b/src/frontend/mame/ui/datmenu.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "ui/ui.h"
#include "ui/menu.h"
-#include "drivenum.h"
#include "rendfont.h"
#include "ui/datfile.h"
#include "ui/datmenu.h"
diff --git a/src/frontend/mame/ui/icorender.h b/src/frontend/mame/ui/icorender.h
index ac942ac922e..677ebf001c7 100644
--- a/src/frontend/mame/ui/icorender.h
+++ b/src/frontend/mame/ui/icorender.h
@@ -64,7 +64,7 @@ typedef struct{
// load an ICO file into a bitmap
//-------------------------------------------------
-void render_load_ico(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, const char *filename)
+inline void render_load_ico(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, const char *filename)
{
INT32 width = 0;
INT32 height = 0;
diff --git a/src/frontend/mame/ui/imgcntrl.cpp b/src/frontend/mame/ui/imgcntrl.cpp
index f06638a2fcb..c8b46afd23f 100644
--- a/src/frontend/mame/ui/imgcntrl.cpp
+++ b/src/frontend/mame/ui/imgcntrl.cpp
@@ -116,10 +116,9 @@ void ui_menu_control_device_image::test_create(bool &can_create, bool &need_conf
break;
default:
- fatalerror("Unexpected\n");
can_create = false;
need_confirm = false;
- break;
+ fatalerror("Unexpected\n");
}
if (entry != nullptr)
diff --git a/src/frontend/mame/ui/mainmenu.cpp b/src/frontend/mame/ui/mainmenu.cpp
index 1202bd136f2..acb318b3b41 100644
--- a/src/frontend/mame/ui/mainmenu.cpp
+++ b/src/frontend/mame/ui/mainmenu.cpp
@@ -11,8 +11,6 @@
#include "emu.h"
#include "crsshair.h"
#include "emuopts.h"
-#include "rendutil.h"
-#include "cheat.h"
#include "ui/menu.h"
#include "ui/filemngr.h"
#include "ui/barcode.h"
diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp
index a10119e876a..c26d22562aa 100644
--- a/src/frontend/mame/ui/menu.cpp
+++ b/src/frontend/mame/ui/menu.cpp
@@ -18,10 +18,6 @@
#include "ui/utils.h"
#include "ui/defimg.h"
#include "ui/starimg.h"
-#include "ui/optsmenu.h"
-#include "ui/datfile.h"
-#include "rendfont.h"
-#include "ui/custmenu.h"
#include "ui/icorender.h"
#include "ui/toolbar.h"
#include "ui/miscmenu.h"
@@ -1436,8 +1432,8 @@ void ui_menu::init_ui(running_machine &machine)
sw_toolbar_bitmap[x] = auto_alloc(machine, bitmap_argb32(32, 32));
toolbar_texture[x] = mrender.texture_alloc();
sw_toolbar_texture[x] = mrender.texture_alloc();
- UINT32 *dst = &toolbar_bitmap[x]->pix32(0);
- memcpy(dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
+ UINT32 *texture_dst = &toolbar_bitmap[x]->pix32(0);
+ memcpy(texture_dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
if (toolbar_bitmap[x]->valid())
toolbar_texture[x]->set_bitmap(*toolbar_bitmap[x], toolbar_bitmap[x]->cliprect(), TEXFORMAT_ARGB32);
else
@@ -1445,8 +1441,8 @@ void ui_menu::init_ui(running_machine &machine)
if (x == 0 || x == 2)
{
- dst = &sw_toolbar_bitmap[x]->pix32(0);
- memcpy(dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
+ texture_dst = &sw_toolbar_bitmap[x]->pix32(0);
+ memcpy(texture_dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32));
if (sw_toolbar_bitmap[x]->valid())
sw_toolbar_texture[x]->set_bitmap(*sw_toolbar_bitmap[x], sw_toolbar_bitmap[x]->cliprect(), TEXFORMAT_ARGB32);
else
diff --git a/src/frontend/mame/ui/miscmenu.cpp b/src/frontend/mame/ui/miscmenu.cpp
index 1a89cd45fa1..38a2d944533 100644
--- a/src/frontend/mame/ui/miscmenu.cpp
+++ b/src/frontend/mame/ui/miscmenu.cpp
@@ -18,7 +18,6 @@
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/miscmenu.h"
-#include "ui/utils.h"
#include "../info.h"
#include "ui/inifile.h"
#include "ui/submenu.h"
@@ -523,7 +522,7 @@ void ui_menu_crosshair::populate()
}
// else
// /* leave a blank filler line when not in auto time so size does not rescale */
-// item_append("", "", NULL, NULL);
+// item_append("", "", nullptr, nullptr);
}
ui_menu_crosshair::~ui_menu_crosshair()
diff --git a/src/frontend/mame/ui/optsmenu.cpp b/src/frontend/mame/ui/optsmenu.cpp
index b08b82b1268..3dbebd3a896 100644
--- a/src/frontend/mame/ui/optsmenu.cpp
+++ b/src/frontend/mame/ui/optsmenu.cpp
@@ -13,12 +13,10 @@
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/submenu.h"
-#include "ui/datfile.h"
#include "ui/inifile.h"
#include "ui/selector.h"
#include "ui/custui.h"
#include "ui/sndmenu.h"
-#include "ui/miscmenu.h"
#include "ui/optsmenu.h"
#include "ui/custmenu.h"
#include "ui/inputmap.h"
@@ -41,7 +39,8 @@ ui_menu_game_options::ui_menu_game_options(running_machine &machine, render_cont
ui_menu_game_options::~ui_menu_game_options()
{
main_filters::actual = m_main;
- ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST);
+ if (ui_menu::menu_stack != nullptr)
+ ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST);
save_ui_options(machine());
ui_globals::switch_image = true;
}
diff --git a/src/frontend/mame/ui/pluginopt.cpp b/src/frontend/mame/ui/pluginopt.cpp
index 6d026c8fabe..ec6d0a4f25d 100644
--- a/src/frontend/mame/ui/pluginopt.cpp
+++ b/src/frontend/mame/ui/pluginopt.cpp
@@ -34,7 +34,7 @@ ui_menu_plugin::ui_menu_plugin(running_machine &machine, render_container *conta
void ui_menu_plugin::populate()
{
for (auto &curplugin : m_plugins)
- item_append(curplugin.c_str(), 0, 0, (void *)curplugin.c_str());
+ item_append(curplugin.c_str(), nullptr, 0, (void *)curplugin.c_str());
item_append(ui_menu_item_type::SEPARATOR);
}
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
index fee7b756c66..25411715817 100644
--- a/src/frontend/mame/ui/selgame.cpp
+++ b/src/frontend/mame/ui/selgame.cpp
@@ -24,7 +24,6 @@
#include "ui/optsmenu.h"
#include "ui/selector.h"
#include "ui/selsoft.h"
-#include "sound/samples.h"
#include "ui/custmenu.h"
#include "../info.h"
#include "ui/auditmenu.h"
@@ -2085,13 +2084,13 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
{
// check size
float textlen = mui.get_string_width(tempbuf.c_str(), text_size);
- float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
+ float tmp_size2 = (textlen > sc) ? text_size * (sc / textlen) : text_size;
size_t last_underscore = tempbuf.find_last_of("_");
if (last_underscore == std::string::npos)
{
mui.draw_text_full(container, tempbuf.c_str(), origx1, oy1, origx2 - origx1, JUSTIFY_CENTER,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size2);
}
else
{
@@ -2102,11 +2101,11 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
float item_width;
mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width,
- JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &item_width, nullptr, tmp_size);
+ JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &item_width, nullptr, tmp_size2);
mui.draw_text_full(container, last_part.c_str(), effective_left + item_width, oy1,
origx2 - origx1 - 2.0f * gutter_width - item_width, JUSTIFY_RIGHT, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size2);
}
}
@@ -2115,7 +2114,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
{
// check size
float textlen = mui.get_string_width(tempbuf.c_str(), text_size);
- float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size;
+ float tmp_size3 = (textlen > sc) ? text_size * (sc / textlen) : text_size;
int first_dspace = (ui_globals::curdats_view == UI_COMMAND_LOAD) ? tempbuf.find(" ") : tempbuf.find(":");
if (first_dspace > 0)
@@ -2126,14 +2125,14 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or
std::string last_part(tempbuf.substr(first_dspace + 1));
strtrimspace(last_part);
mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width, JUSTIFY_LEFT,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size3);
mui.draw_text_full(container, last_part.c_str(), effective_left, oy1, origx2 - origx1 - 2.0f * gutter_width,
- JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size3);
}
else
mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
- WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size);
+ WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size3);
}
else
mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT,
diff --git a/src/frontend/mame/ui/simpleselgame.cpp b/src/frontend/mame/ui/simpleselgame.cpp
index cd8ac95c792..dce3a395712 100644
--- a/src/frontend/mame/ui/simpleselgame.cpp
+++ b/src/frontend/mame/ui/simpleselgame.cpp
@@ -15,7 +15,6 @@
#include "ui/menu.h"
#include "uiinput.h"
#include "ui/simpleselgame.h"
-#include "ui/inputmap.h"
#include "ui/miscmenu.h"
#include "ui/optsmenu.h"
#include "drivenum.h"
diff --git a/src/frontend/mame/ui/sliders.cpp b/src/frontend/mame/ui/sliders.cpp
index 8ec21b8894c..75d40c2ace3 100644
--- a/src/frontend/mame/ui/sliders.cpp
+++ b/src/frontend/mame/ui/sliders.cpp
@@ -11,7 +11,6 @@
#include "emu.h"
#include "osdepend.h"
-#include "uiinput.h"
#include "ui/ui.h"
#include "ui/menu.h"
#include "ui/sliders.h"
diff --git a/src/frontend/mame/ui/submenu.cpp b/src/frontend/mame/ui/submenu.cpp
index 68b8d85d36a..2d5984606eb 100644
--- a/src/frontend/mame/ui/submenu.cpp
+++ b/src/frontend/mame/ui/submenu.cpp
@@ -13,7 +13,6 @@
#include "ui/submenu.h"
#include "ui/utils.h"
#include <limits>
-#include <iterator>
//-------------------------------------------------
// ctor / dtor
@@ -89,7 +88,6 @@ ui_submenu::ui_submenu(running_machine &machine, render_container *container, st
sm_option.options = dynamic_cast<core_options*>(&mame_machine_manager::instance()->ui().options());
break;
default:
- continue;
break;
}
}
@@ -204,7 +202,7 @@ void ui_submenu::populate()
UINT32 arrow_flags;
// add options
- for (auto sm_option = m_options.begin(); sm_option < m_options.end(); sm_option++)
+ for (auto sm_option = m_options.begin(); sm_option < m_options.end(); ++sm_option)
{
// skip first heading (is menu title)
if (sm_option == m_options.begin() && sm_option->type == ui_submenu::HEAD) continue;
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index a7d88ea0b31..c075c884d1b 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -267,7 +267,18 @@ static const UINT32 mouse_bitmap[32*32] =
//-------------------------------------------------
mame_ui_manager::mame_ui_manager(running_machine &machine)
- : ui_manager(machine)
+ : ui_manager(machine),
+ m_font(nullptr),
+ m_handler_callback(nullptr),
+ m_handler_param(0),
+ m_single_step(false),
+ m_showfps(false),
+ m_showfps_end(0),
+ m_show_profiler(false),
+ m_popup_text_end(0),
+ m_mouse_arrow_texture(nullptr),
+ m_mouse_show(false),
+ m_load_save_hold(false)
{
}
@@ -278,18 +289,6 @@ void mame_ui_manager::init()
ui_menu::init(machine());
ui_gfx_init(machine());
- // reset instance variables
- m_font = nullptr;
- m_handler_callback = nullptr;
- m_handler_param = 0;
- m_single_step = false;
- m_showfps = false;
- m_showfps_end = 0;
- m_show_profiler = false;
- m_popup_text_end = 0;
- m_mouse_arrow_texture = nullptr;
- m_load_save_hold = false;
-
get_font_rows(&machine());
decode_ui_color(0, &machine());
@@ -1528,13 +1527,13 @@ UINT32 mame_ui_manager::handler_ingame(running_machine &machine, render_containe
if (mame_machine_manager::instance()->ui().show_timecode_counter()) {
std::string tempstring;
mame_machine_manager::instance()->ui().draw_text_full(container, machine.video().timecode_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
- JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0xf0,0x10,0x10), ARGB_BLACK, NULL, NULL);
+ JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0xf0,0x10,0x10), ARGB_BLACK, nullptr, nullptr);
}
// Show the total time elapsed for the video preview (all parts intro, gameplay, extras)
if (mame_machine_manager::instance()->ui().show_timecode_total()) {
std::string tempstring;
mame_machine_manager::instance()->ui().draw_text_full(container, machine.video().timecode_total_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
- JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0x10,0xf0,0x10), ARGB_BLACK, NULL, NULL);
+ JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0x10,0xf0,0x10), ARGB_BLACK, nullptr, nullptr);
}
diff --git a/src/frontend/mame/ui/viewgfx.cpp b/src/frontend/mame/ui/viewgfx.cpp
index 2a49b00983d..94949210dfc 100644
--- a/src/frontend/mame/ui/viewgfx.cpp
+++ b/src/frontend/mame/ui/viewgfx.cpp
@@ -184,7 +184,7 @@ static void ui_gfx_count_devices(running_machine &machine, ui_gfx_state &state)
while (count < MAX_GFX_ELEMENTS && interface.gfx(count) != nullptr)
count++;
- // count = index of first NULL
+ // count = index of first nullptr
if (count > 0)
{
state.gfxdev[state.gfxset.devcount].interface = &interface;