diff options
author | 2016-02-24 07:46:57 +0100 | |
---|---|---|
committer | 2016-02-24 07:46:57 +0100 | |
commit | 3abcaee63ff285514e8b51a60949c97a7dfa5304 (patch) | |
tree | 63e6be46c1932606689f9bfacc920d69cfc4b51f /src/emu | |
parent | 0cbd8782119b140920097a2bee76f36aef014be9 (diff) |
Cleanups and version bump
Diffstat (limited to 'src/emu')
40 files changed, 466 insertions, 473 deletions
diff --git a/src/emu/clifront.cpp b/src/emu/clifront.cpp index 6b75841df83..8967e4c0343 100644 --- a/src/emu/clifront.cpp +++ b/src/emu/clifront.cpp @@ -107,10 +107,10 @@ int cli_frontend::execute(int argc, char **argv) m_options.parse_command_line(argc, argv, option_errors); m_options.parse_standard_inis(option_errors); - + //load_translation(); load_translation(m_options); - + manager->start_luaengine(); if (*(m_options.software_name()) != 0) diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index c4686c5566f..727b08e8f60 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -1930,7 +1930,7 @@ void device_debug::instruction_hook(offs_t curpc) machine.debug_view().flush_osd_updates(); machine.manager().lua()->periodic_check(); - + // clear the memory modified flag and wait global->memory_modified = false; if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED) diff --git a/src/emu/drivers/empty.cpp b/src/emu/drivers/empty.cpp index be4f53b24a7..f012e376813 100644 --- a/src/emu/drivers/empty.cpp +++ b/src/emu/drivers/empty.cpp @@ -33,7 +33,7 @@ public: if (strcmp(machine().options().ui(),"simple")==0) { ui_simple_menu_select_game::force_game_select(machine(), &machine().render().ui_container()); } else { - ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container()); + ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container()); } } diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 1fb827ed1a6..2ff24849bf8 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -184,8 +184,8 @@ const options_entry emu_options::s_option_entries[] = { OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" }, { OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" }, { OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" }, - { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, - { OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" }, + { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, + { OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" }, { OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" }, { OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" }, { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" }, diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index 85e054a4c43..79df39c7438 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -74,7 +74,7 @@ enum #define OPTION_PLAYBACK "playback" #define OPTION_RECORD "record" #define OPTION_RECORD_TIMECODE "record_timecode" -#define OPTION_EXIT_AFTER_PLAYBACK "exit_after_playback" +#define OPTION_EXIT_AFTER_PLAYBACK "exit_after_playback" #define OPTION_MNGWRITE "mngwrite" #define OPTION_AVIWRITE "aviwrite" #ifdef MAME_DEBUG @@ -178,7 +178,7 @@ enum #define OPTION_CHEAT "cheat" #define OPTION_SKIP_GAMEINFO "skip_gameinfo" #define OPTION_UI_FONT "uifont" -#define OPTION_UI "ui" +#define OPTION_UI "ui" #define OPTION_RAMSIZE "ramsize" // core comm options @@ -359,7 +359,7 @@ public: const char *bios() const { return value(OPTION_BIOS); } bool cheat() const { return bool_value(OPTION_CHEAT); } bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); } - const char *ui_font() const { return value(OPTION_UI_FONT); } + const char *ui_font() const { return value(OPTION_UI_FONT); } const char *ui() const { return value(OPTION_UI); } const char *ram_size() const { return value(OPTION_RAMSIZE); } @@ -368,7 +368,7 @@ public: const char *comm_localport() const { return value(OPTION_COMM_LOCAL_PORT); } const char *comm_remotehost() const { return value(OPTION_COMM_REMOTE_HOST); } const char *comm_remoteport() const { return value(OPTION_COMM_REMOTE_PORT); } - + bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); } bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); } @@ -378,7 +378,7 @@ public: const char *autoboot_script() const { return value(OPTION_AUTOBOOT_SCRIPT); } bool console() const { return bool_value(OPTION_CONSOLE); } - + const char *language() const { return value(OPTION_LANGUAGE); } // FIXME: Couriersud: This should be in image_device_exit diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index a898a10051b..4d2a7852f91 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -2479,7 +2479,7 @@ ioport_manager::ioport_manager(running_machine &machine) m_has_dips(false), m_has_bioses(false), m_autofire_toggle(false), - m_autofire_delay(3) // 1 seems too fast for a bunch of games + m_autofire_delay(3) // 1 seems too fast for a bunch of games { memset(m_type_to_entry, 0, sizeof(m_type_to_entry)); } @@ -3555,8 +3555,8 @@ void ioport_manager::timecode_write(_Type value) /*template<> void ioport_manager::timecode_write<bool>(bool value) { - UINT8 byte = UINT8(value); - timecode_write(byte); + UINT8 byte = UINT8(value); + timecode_write(byte); }*/ template<> void ioport_manager::timecode_write<std::string>(std::string value) { diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 6d9d941fa4a..bc8dab543be 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -1096,7 +1096,7 @@ public: struct user_settings { ioport_value value; // for DIP switches - bool autofire; // for autofire settings + bool autofire; // for autofire settings input_seq seq[SEQ_TYPE_TOTAL]; // sequences of all types INT32 sensitivity; // for analog controls INT32 delta; // for analog controls @@ -1486,8 +1486,8 @@ private: UINT64 m_playback_accumulated_speed; // accumulated speed during playback UINT32 m_playback_accumulated_frames; // accumulated frames during playback emu_file m_timecode_file; // timecode/frames playback file (NULL if not recording) - int m_timecode_count; - attotime m_timecode_last_time; + int m_timecode_count; + attotime m_timecode_last_time; // has... bool m_has_configs; diff --git a/src/emu/language.cpp b/src/emu/language.cpp index 23a2d251fab..b47605f50c8 100644 --- a/src/emu/language.cpp +++ b/src/emu/language.cpp @@ -2,9 +2,9 @@ // copyright-holders:Miodrag Milanovic /*************************************************************************** - language.cpp + language.cpp - Multi-language support. + Multi-language support. ***************************************************************************/ @@ -75,4 +75,4 @@ void load_translation(emu_options &m_options) } global_free_array(buffer); } -}
\ No newline at end of file +} diff --git a/src/emu/language.h b/src/emu/language.h index ce536531d89..2a9d934576b 100644 --- a/src/emu/language.h +++ b/src/emu/language.h @@ -2,9 +2,9 @@ // copyright-holders:Miodrag Milanovic /*************************************************************************** - language.h + language.h - Multi-language support. + Multi-language support. ***************************************************************************/ #pragma once @@ -20,13 +20,12 @@ // LOCALIZATION SUPPORT //************************************************************************** -#define _(param) lang_translate(param) +#define _(param) lang_translate(param) // Fake one to make possible using it in static text definitions, on those // lang_translate must be called afterwards -#define __(param) param +#define __(param) param void load_translation(emu_options &option); const char *lang_translate(const char *word); #endif /*__LANGUAGE_H__*/ - diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp index 990f417eac4..b8f1d0772ec 100644 --- a/src/emu/luaengine.cpp +++ b/src/emu/luaengine.cpp @@ -51,7 +51,7 @@ extern "C" { int luaopen_zlib(lua_State *L); int luaopen_luv(lua_State *L); int luaopen_lfs(lua_State *L); - uv_loop_t* luv_loop(lua_State* L); + uv_loop_t* luv_loop(lua_State* L); } static void lstop(lua_State *L, lua_Debug *ar) @@ -744,7 +744,7 @@ int lua_engine::lua_options_entry::l_entry_value(lua_State *L) luaL_error(L, "%s", error.c_str()); } } - + switch (e->type()) { case OPTION_BOOLEAN: @@ -1194,7 +1194,7 @@ lua_engine::lua_engine() lua_gc(m_lua_state, LUA_GCSTOP, 0); /* stop collector during initialization */ luaL_openlibs(m_lua_state); /* open libraries */ - // Get package.preload so we can store builtins in it. + // Get package.preload so we can store builtins in it. lua_getglobal(m_lua_state, "package"); lua_getfield(m_lua_state, -1, "preload"); lua_remove(m_lua_state, -2); // Remove package @@ -1205,13 +1205,13 @@ lua_engine::lua_engine() lua_pushcfunction(m_lua_state, luaopen_zlib); lua_setfield(m_lua_state, -2, "zlib"); - + lua_pushcfunction(m_lua_state, luaopen_lsqlite3); lua_setfield(m_lua_state, -2, "lsqlite3"); lua_pushcfunction(m_lua_state, luaopen_lfs); lua_setfield(m_lua_state, -2, "lfs"); - + luaopen_ioport(m_lua_state); lua_gc(m_lua_state, LUA_GCRESTART, 0); @@ -1668,7 +1668,7 @@ void lua_engine::periodic_check() auto loop = luv_loop(m_lua_state); if (loop!=nullptr) uv_run(loop, UV_RUN_NOWAIT); - + } //------------------------------------------------- diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 5119dec397c..0c8d85a4540 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -2,69 +2,69 @@ // copyright-holders:Aaron Giles /*************************************************************************** - machine.c + machine.c - Controls execution of the core MAME system. + Controls execution of the core MAME system. **************************************************************************** - Since there has been confusion in the past over the order of - initialization and other such things, here it is, all spelled out - as of January, 2008: - - main() - - does platform-specific init - - calls mame_execute() [mame.c] - - mame_execute() [mame.c] - - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers - - begins resource tracking (level 1) - - calls create_machine [mame.c] to initialize the running_machine structure - - calls init_machine() [mame.c] - - init_machine() [mame.c] - - calls fileio_init() [fileio.c] to initialize file I/O info - - calls config_init() [config.c] to initialize configuration system - - calls input_init() [input.c] to initialize the input system - - calls output_init() [output.c] to initialize the output system - - calls state_init() [state.c] to initialize save state system - - calls state_save_allow_registration() [state.c] to allow registrations - - calls palette_init() [palette.c] to initialize palette system - - calls render_init() [render.c] to initialize the rendering system - - calls ui_init() [ui.c] to initialize the user interface - - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures - - calls timer_init() [timer.c] to reset the timer system - - calls osd_init() [osdepend.h] to do platform-specific initialization - - calls input_port_init() [inptport.c] to set up the input ports - - calls rom_init() [romload.c] to load the game's ROMs - - calls memory_init() [memory.c] to process the game's memory maps - - calls the driver's DRIVER_INIT callback - - calls device_list_start() [devintrf.c] to start any devices - - calls video_init() [video.c] to start the video system - - calls tilemap_init() [tilemap.c] to start the tilemap system - - calls crosshair_init() [crsshair.c] to configure the crosshairs - - calls sound_init() [sound.c] to start the audio system - - calls debugger_init() [debugger.c] to set up the debugger - - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks - - calls cheat_init() [cheat.c] to initialize the cheat system - - calls image_init() [image.c] to initialize the image system - - - calls config_load_settings() [config.c] to load the configuration file - - calls nvram_load [machine/generic.c] to load NVRAM - - calls ui_display_startup_screens() [ui.c] to display the startup screens - - begins resource tracking (level 2) - - calls soft_reset() [mame.c] to reset all systems - - -------------------( at this point, we're up and running )---------------------- - - - calls scheduler->timeslice() [schedule.c] over and over until we exit - - ends resource tracking (level 2), freeing all auto_mallocs and timers - - calls the nvram_save() [machine/generic.c] to save NVRAM - - calls config_save_settings() [config.c] to save the game's configuration - - calls all registered exit routines [mame.c] - - ends resource tracking (level 1), freeing all auto_mallocs and timers - - - exits the program + Since there has been confusion in the past over the order of + initialization and other such things, here it is, all spelled out + as of January, 2008: + + main() + - does platform-specific init + - calls mame_execute() [mame.c] + + mame_execute() [mame.c] + - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers + - begins resource tracking (level 1) + - calls create_machine [mame.c] to initialize the running_machine structure + - calls init_machine() [mame.c] + + init_machine() [mame.c] + - calls fileio_init() [fileio.c] to initialize file I/O info + - calls config_init() [config.c] to initialize configuration system + - calls input_init() [input.c] to initialize the input system + - calls output_init() [output.c] to initialize the output system + - calls state_init() [state.c] to initialize save state system + - calls state_save_allow_registration() [state.c] to allow registrations + - calls palette_init() [palette.c] to initialize palette system + - calls render_init() [render.c] to initialize the rendering system + - calls ui_init() [ui.c] to initialize the user interface + - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures + - calls timer_init() [timer.c] to reset the timer system + - calls osd_init() [osdepend.h] to do platform-specific initialization + - calls input_port_init() [inptport.c] to set up the input ports + - calls rom_init() [romload.c] to load the game's ROMs + - calls memory_init() [memory.c] to process the game's memory maps + - calls the driver's DRIVER_INIT callback + - calls device_list_start() [devintrf.c] to start any devices + - calls video_init() [video.c] to start the video system + - calls tilemap_init() [tilemap.c] to start the tilemap system + - calls crosshair_init() [crsshair.c] to configure the crosshairs + - calls sound_init() [sound.c] to start the audio system + - calls debugger_init() [debugger.c] to set up the debugger + - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks + - calls cheat_init() [cheat.c] to initialize the cheat system + - calls image_init() [image.c] to initialize the image system + + - calls config_load_settings() [config.c] to load the configuration file + - calls nvram_load [machine/generic.c] to load NVRAM + - calls ui_display_startup_screens() [ui.c] to display the startup screens + - begins resource tracking (level 2) + - calls soft_reset() [mame.c] to reset all systems + + -------------------( at this point, we're up and running )---------------------- + + - calls scheduler->timeslice() [schedule.c] over and over until we exit + - ends resource tracking (level 2), freeing all auto_mallocs and timers + - calls the nvram_save() [machine/generic.c] to save NVRAM + - calls config_save_settings() [config.c] to save the game's configuration + - calls all registered exit routines [mame.c] + - ends resource tracking (level 1), freeing all auto_mallocs and timers + + - exits the program ***************************************************************************/ @@ -1326,12 +1326,12 @@ void system_time::full_time::set(struct tm &t) { second = t.tm_sec; minute = t.tm_min; - hour = t.tm_hour; - mday = t.tm_mday; + hour = t.tm_hour; + mday = t.tm_mday; month = t.tm_mon; - year = t.tm_year + 1900; + year = t.tm_year + 1900; weekday = t.tm_wday; - day = t.tm_yday; + day = t.tm_yday; is_dst = t.tm_isdst; } diff --git a/src/emu/ui/auditmenu.cpp b/src/emu/ui/auditmenu.cpp index 97d84568118..9703545948e 100644 --- a/src/emu/ui/auditmenu.cpp +++ b/src/emu/ui/auditmenu.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:BSD-3-Clause // copyright-holders:Dankan1890 /********************************************************************* diff --git a/src/emu/ui/cheatopt.cpp b/src/emu/ui/cheatopt.cpp index 6de3cb55936..9191323d059 100644 --- a/src/emu/ui/cheatopt.cpp +++ b/src/emu/ui/cheatopt.cpp @@ -192,7 +192,7 @@ void ui_menu_autofire::handle() if (menu_event->itemref == ITEMREF_AUTOFIRE_STATUS) { // toggle autofire status - bool autofire_toggle = machine().ioport().get_autofire_toggle(); // (menu_event->iptkey == IPT_UI_LEFT); + bool autofire_toggle = machine().ioport().get_autofire_toggle(); // (menu_event->iptkey == IPT_UI_LEFT); machine().ioport().set_autofire_toggle(!autofire_toggle); changed = true; } @@ -321,5 +321,3 @@ void ui_menu_autofire::populate() last_toggle = autofire_toggle; } - - diff --git a/src/emu/ui/ctrlmenu.cpp b/src/emu/ui/ctrlmenu.cpp index f954a596f7a..9215ef19783 100644 --- a/src/emu/ui/ctrlmenu.cpp +++ b/src/emu/ui/ctrlmenu.cpp @@ -44,7 +44,7 @@ ui_menu_controller_mapping::ui_menu_controller_mapping(running_machine &machine, ui_menu_controller_mapping::~ui_menu_controller_mapping() { std::string error_string; - for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) + for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) { if (strcmp(machine().options().value(m_options[d].option),m_device_status[m_options[d].status])!=0) { @@ -104,7 +104,7 @@ void ui_menu_controller_mapping::custom_render(void *selectedref, float top, flo ui_manager &mui = machine().ui(); mui.draw_text_full(container, _("Device Mapping"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); @@ -124,7 +124,7 @@ void ui_menu_controller_mapping::custom_render(void *selectedref, float top, flo // draw the text within it mui.draw_text_full(container, _("Device Mapping"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } diff --git a/src/emu/ui/custmenu.cpp b/src/emu/ui/custmenu.cpp index 3a50f4bfc03..e52c9ced27d 100644 --- a/src/emu/ui/custmenu.cpp +++ b/src/emu/ui/custmenu.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:BSD-3-Clause // copyright-holders:Dankan1890 /********************************************************************* @@ -208,7 +208,7 @@ void ui_menu_custom_filter::custom_render(void *selectedref, float top, float bo // get the size of the text mui.draw_text_full(container, _("Select custom filters:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; float maxwidth = MAX(width, origx2 - origx1); @@ -228,7 +228,7 @@ void ui_menu_custom_filter::custom_render(void *selectedref, float top, float bo // draw the text within it mui.draw_text_full(container, _("Select custom filters:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } //------------------------------------------------- @@ -521,7 +521,7 @@ void ui_menu_swcustom_filter::custom_render(void *selectedref, float top, float // get the size of the text mui.draw_text_full(container, _("Select custom filters:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; float maxwidth = MAX(width, origx2 - origx1); @@ -541,7 +541,7 @@ void ui_menu_swcustom_filter::custom_render(void *selectedref, float top, float // draw the text within it mui.draw_text_full(container, _("Select custom filters:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } //------------------------------------------------- @@ -577,4 +577,3 @@ void ui_menu_swcustom_filter::save_sw_custom_filters() file.close(); } } - diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp index 6492faebabf..55f2e40afbb 100644 --- a/src/emu/ui/custui.cpp +++ b/src/emu/ui/custui.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:BSD-3-Clause // copyright-holders:Dankan1890 /********************************************************************* @@ -16,10 +16,10 @@ #include "ui/utils.h" #include <algorithm> -const char *ui_menu_custom_ui::hide_status[] = { - __("Show All"), - __("Hide Filters"), - __("Hide Info/Image"), +const char *ui_menu_custom_ui::hide_status[] = { + __("Show All"), + __("Hide Filters"), + __("Hide Info/Image"), __("Hide Both") }; //------------------------------------------------- @@ -63,7 +63,7 @@ ui_menu_custom_ui::~ui_menu_custom_ui() ui_globals::reset = true; } -//------------------------------------------------- +//------------------------------------------------- // handle //------------------------------------------------- @@ -160,7 +160,7 @@ void ui_menu_custom_ui::custom_render(void *selectedref, float top, float bottom ui_manager &mui = machine().ui(); mui.draw_text_full(container, _("Custom UI Settings"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; float maxwidth = MAX(origx2 - origx1, width); @@ -180,7 +180,7 @@ void ui_menu_custom_ui::custom_render(void *selectedref, float top, float bottom // draw the text within it mui.draw_text_full(container, _("Custom UI Settings"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } //------------------------------------------------- @@ -406,7 +406,7 @@ void ui_menu_font_ui::custom_render(void *selectedref, float top, float bottom, std::string topbuf(_("UI Fonts Settings")); mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; float maxwidth = MAX(origx2 - origx1, width); @@ -426,14 +426,14 @@ void ui_menu_font_ui::custom_render(void *selectedref, float top, float bottom, // draw the text within it mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); if ((FPTR)selectedref == INFOS_SIZE) { topbuf = _("Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."); mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr, m_info_size); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr, m_info_size); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(origx2 - origx1, width); @@ -453,7 +453,7 @@ void ui_menu_font_ui::custom_render(void *selectedref, float top, float bottom, // draw the text within it mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, m_info_size); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, m_info_size); } } @@ -565,7 +565,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom std::string topbuf(_("UI Colors Settings")); mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); @@ -585,7 +585,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom // draw the text within it mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); // bottom text // get the text for 'UI Select' @@ -593,7 +593,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom topbuf.assign(_("Double click or press ")).append(ui_select_text.c_str()).append(_(" to change the color value")); mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); @@ -613,13 +613,13 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom // draw the text within it mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); // compute maxwidth topbuf = _("Menu Preview"); mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); maxwidth = width + 2.0f * UI_BOX_LR_BORDER; std::string sampletxt[5]; @@ -633,7 +633,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom for (auto & elem: sampletxt) { mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); } @@ -655,7 +655,7 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom // draw the text within it mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); // compute our bounds for menu preview x1 -= UI_BOX_LR_BORDER; @@ -673,29 +673,29 @@ void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom // draw normal text mui.draw_text_full(container, sampletxt[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, m_color_table[MUI_TEXT_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); + DRAW_NORMAL, m_color_table[MUI_TEXT_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); y1 += line_height; // draw subitem text mui.draw_text_full(container, sampletxt[1].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, m_color_table[MUI_SUBITEM_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); + DRAW_NORMAL, m_color_table[MUI_SUBITEM_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); y1 += line_height; // draw selected text highlight(container, x1, y1, x2, y1 + line_height, m_color_table[MUI_SELECTED_BG_COLOR].color); mui.draw_text_full(container, sampletxt[2].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, m_color_table[MUI_SELECTED_COLOR].color, m_color_table[MUI_SELECTED_BG_COLOR].color, nullptr, nullptr); + DRAW_NORMAL, m_color_table[MUI_SELECTED_COLOR].color, m_color_table[MUI_SELECTED_BG_COLOR].color, nullptr, nullptr); y1 += line_height; // draw mouse over text highlight(container, x1, y1, x2, y1 + line_height, m_color_table[MUI_MOUSEOVER_BG_COLOR].color); mui.draw_text_full(container, sampletxt[3].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, m_color_table[MUI_MOUSEOVER_COLOR].color, m_color_table[MUI_MOUSEOVER_BG_COLOR].color, nullptr, nullptr); + DRAW_NORMAL, m_color_table[MUI_MOUSEOVER_COLOR].color, m_color_table[MUI_MOUSEOVER_BG_COLOR].color, nullptr, nullptr); y1 += line_height; // draw clone text mui.draw_text_full(container, sampletxt[4].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, m_color_table[MUI_CLONE_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); + DRAW_NORMAL, m_color_table[MUI_CLONE_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); } @@ -912,7 +912,7 @@ void ui_menu_rgb_ui::custom_render(void *selectedref, float top, float bottom, f // top text std::string topbuf = std::string(m_title).append(_(" - ARGB Settings")); mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); @@ -932,12 +932,12 @@ void ui_menu_rgb_ui::custom_render(void *selectedref, float top, float bottom, f // draw the text within it mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); std::string sampletxt(_("Color preview =")); maxwidth = origx2 - origx1; mui.draw_text_full(container, sampletxt.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); @@ -957,7 +957,7 @@ void ui_menu_rgb_ui::custom_render(void *selectedref, float top, float bottom, f // draw the normal text mui.draw_text_full(container, sampletxt.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr); + DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr); float t_x2 = x1 - UI_BOX_LR_BORDER + maxwidth; x1 = x2 + 2.0f * UI_BOX_LR_BORDER; @@ -1046,7 +1046,7 @@ ui_menu_palette_sel::palcolor ui_menu_palette_sel::m_palette[] = { // ctor //------------------------------------------------- -ui_menu_palette_sel::ui_menu_palette_sel(running_machine &machine, render_container *container, rgb_t &_color) +ui_menu_palette_sel::ui_menu_palette_sel(running_machine &machine, render_container *container, rgb_t &_color) : ui_menu(machine, container), m_original(_color) { } diff --git a/src/emu/ui/custui.h b/src/emu/ui/custui.h index 0a2caf8de8c..2ff13994cb6 100644 --- a/src/emu/ui/custui.h +++ b/src/emu/ui/custui.h @@ -68,9 +68,9 @@ private: }; #ifdef UI_WINDOWS - UINT16 m_actual; - std::vector<std::string> m_fonts; - bool m_bold, m_italic; + UINT16 m_actual; + std::vector<std::string> m_fonts; + bool m_bold, m_italic; void list(); static int CALLBACK EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam); diff --git a/src/emu/ui/datfile.cpp b/src/emu/ui/datfile.cpp index 9171242d072..7a5ebb57e6f 100644 --- a/src/emu/ui/datfile.cpp +++ b/src/emu/ui/datfile.cpp @@ -25,7 +25,7 @@ static std::string TAG_COMMAND("$cmd"); static std::string TAG_END("$end"); static std::string TAG_DRIVER("$drv"); static std::string TAG_STORY("$story"); -static std::string TAG_HISTORY_R("## REVISION:"); +static std::string TAG_HISTORY_R("## REVISION:"); static std::string TAG_MAMEINFO_R("# MAMEINFO.DAT"); static std::string TAG_MESSINFO_R("# MESSINFO.DAT"); static std::string TAG_SYSINFO_R("# This file was generated on"); @@ -540,7 +540,7 @@ int datfile_manager::index_datafile(dataindex &index, int &swcount) } //--------------------------------------------------------- -// parseopen - Open up file for reading +// parseopen - Open up file for reading //--------------------------------------------------------- bool datfile_manager::parseopen(const char *filename) { @@ -647,4 +647,4 @@ void datfile_manager::command_sub_menu(const game_driver *drv, std::vector<std:: menuitems.push_back(elem.first); parseclose(); } -}
\ No newline at end of file +} diff --git a/src/emu/ui/datfile.h b/src/emu/ui/datfile.h index 8002a26daf4..66d76d17501 100644 --- a/src/emu/ui/datfile.h +++ b/src/emu/ui/datfile.h @@ -38,7 +38,7 @@ public: std::string rev_messinfo() const { return m_mess_rev; } std::string rev_sysinfo() const { return m_sysinfo_rev; } std::string rev_storyinfo() const { return m_story_rev; } - + bool has_history(const game_driver *driver) { return (m_histidx.find(driver) != m_histidx.end()); } bool has_mameinfo(const game_driver *driver) { return (m_mameidx.find(driver) != m_mameidx.end()); } bool has_messinfo(const game_driver *driver) { return (m_messidx.find(driver) != m_messidx.end()); } @@ -46,8 +46,8 @@ public: bool has_sysinfo(const game_driver *driver) { return (m_sysidx.find(driver) != m_sysidx.end()); } bool has_story(const game_driver *driver) { return (m_storyidx.find(driver) != m_storyidx.end()); } - bool has_data(const game_driver *d) - { + bool has_data(const game_driver *d) + { return (has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d)); } private: @@ -84,8 +84,8 @@ private: running_machine &m_machine; // reference to our machine std::string m_fullpath; static std::string m_history_rev, m_mame_rev, m_mess_rev, m_sysinfo_rev, m_story_rev; - FILE *fp = nullptr; - static bool first_run; + FILE *fp = nullptr; + static bool first_run; }; diff --git a/src/emu/ui/datmenu.cpp b/src/emu/ui/datmenu.cpp index ba8dde22bad..a86c7eee5ed 100644 --- a/src/emu/ui/datmenu.cpp +++ b/src/emu/ui/datmenu.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:BSD-3-Clause // copyright-holders:Dankan1890 /********************************************************************* @@ -198,7 +198,7 @@ void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom std::string revision; revision.assign(_("Revision: ")).append(m_items_list[actual].revision); mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(origx2 - origx1, width); @@ -218,7 +218,7 @@ void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom // draw the text within it mui.draw_text_full(container, revision.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } //------------------------------------------------- @@ -300,4 +300,3 @@ void ui_menu_dats_view::init_items() if (datfile.has_command(m_driver)) m_items_list.emplace_back(_("Command"), UI_COMMAND_LOAD, ""); } - diff --git a/src/emu/ui/datmenu.h b/src/emu/ui/datmenu.h index f799e5fa7d0..0d2ae7d686d 100644 --- a/src/emu/ui/datmenu.h +++ b/src/emu/ui/datmenu.h @@ -31,7 +31,7 @@ public: virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; private: - int actual; + int actual; const game_driver *m_driver; ui_software_info *m_swinfo; std::string m_list, m_short, m_long, m_parent; @@ -43,7 +43,7 @@ private: { list_items(std::string l, int i, std::string rev) { label = l; option = i; revision = rev; } std::string label; - int option; + int option; std::string revision; }; std::vector<list_items> m_items_list; diff --git a/src/emu/ui/dirmenu.cpp b/src/emu/ui/dirmenu.cpp index f1cc16bae0b..30a992f2363 100644 --- a/src/emu/ui/dirmenu.cpp +++ b/src/emu/ui/dirmenu.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:BSD-3-Clause // copyright-holders:Dankan1890 /********************************************************************* @@ -28,33 +28,33 @@ struct folders_entry static const folders_entry s_folders[] = { - { __("ROMs"), OPTION_MEDIAPATH, ADDING }, - { __("UI"), OPTION_UI_PATH, CHANGE }, - { __("Language"), OPTION_LANGUAGEPATH, CHANGE }, - { __("Samples"), OPTION_SAMPLEPATH, ADDING }, - { __("DATs"), OPTION_HISTORY_PATH, CHANGE }, - { __("INIs"), OPTION_INIPATH, ADDING }, - { __("Extra INIs"), OPTION_EXTRAINI_PATH, CHANGE }, - { __("Icons"), OPTION_ICONS_PATH, ADDING }, - { __("Cheats"), OPTION_CHEATPATH, ADDING }, - { __("Snapshots"), OPTION_SNAPSHOT_DIRECTORY, ADDING }, - { __("Cabinets"), OPTION_CABINETS_PATH, ADDING }, - { __("Flyers"), OPTION_FLYERS_PATH, ADDING }, - { __("Titles"), OPTION_TITLES_PATH, ADDING }, - { __("Ends"), OPTION_ENDS_PATH, ADDING }, - { __("PCBs"), OPTION_PCBS_PATH, ADDING }, - { __("Marquees"), OPTION_MARQUEES_PATH, ADDING }, - { __("Controls Panels"), OPTION_CPANELS_PATH, ADDING }, - { __("Crosshairs"), OPTION_CROSSHAIRPATH, ADDING }, - { __("Artworks"), OPTION_ARTPATH, ADDING }, - { __("Bosses"), OPTION_BOSSES_PATH, ADDING }, - { __("Artworks Preview"), OPTION_ARTPREV_PATH, ADDING }, - { __("Select"), OPTION_SELECT_PATH, ADDING }, - { __("GameOver"), OPTION_GAMEOVER_PATH, ADDING }, - { __("HowTo"), OPTION_HOWTO_PATH, ADDING }, - { __("Logos"), OPTION_LOGOS_PATH, ADDING }, - { __("Scores"), OPTION_SCORES_PATH, ADDING }, - { __("Versus"), OPTION_VERSUS_PATH, ADDING }, + { __("ROMs"), OPTION_MEDIAPATH, ADDING }, + { __("UI"), OPTION_UI_PATH, CHANGE }, + { __("Language"), OPTION_LANGUAGEPATH, CHANGE }, + { __("Samples"), OPTION_SAMPLEPATH, ADDING }, + { __("DATs"), OPTION_HISTORY_PATH, CHANGE }, + { __("INIs"), OPTION_INIPATH, ADDING }, + { __("Extra INIs"), OPTION_EXTRAINI_PATH, CHANGE }, + { __("Icons"), OPTION_ICONS_PATH, ADDING }, + { __("Cheats"), OPTION_CHEATPATH, ADDING }, + { __("Snapshots"), OPTION_SNAPSHOT_DIRECTORY, ADDING }, + { __("Cabinets"), OPTION_CABINETS_PATH, ADDING }, + { __("Flyers"), OPTION_FLYERS_PATH, ADDING }, + { __("Titles"), OPTION_TITLES_PATH, ADDING }, + { __("Ends"), OPTION_ENDS_PATH, ADDING }, + { __("PCBs"), OPTION_PCBS_PATH, ADDING }, + { __("Marquees"), OPTION_MARQUEES_PATH, ADDING }, + { __("Controls Panels"), OPTION_CPANELS_PATH, ADDING }, + { __("Crosshairs"), OPTION_CROSSHAIRPATH, ADDING }, + { __("Artworks"), OPTION_ARTPATH, ADDING }, + { __("Bosses"), OPTION_BOSSES_PATH, ADDING }, + { __("Artworks Preview"), OPTION_ARTPREV_PATH, ADDING }, + { __("Select"), OPTION_SELECT_PATH, ADDING }, + { __("GameOver"), OPTION_GAMEOVER_PATH, ADDING }, + { __("HowTo"), OPTION_HOWTO_PATH, ADDING }, + { __("Logos"), OPTION_LOGOS_PATH, ADDING }, + { __("Scores"), OPTION_SCORES_PATH, ADDING }, + { __("Versus"), OPTION_VERSUS_PATH, ADDING }, }; @@ -94,7 +94,6 @@ void ui_menu_directory::handle() void ui_menu_directory::populate() { - for (auto & elem : s_folders) item_append(_(elem.name), nullptr, 0, (void *)(FPTR)elem.action); @@ -143,7 +142,7 @@ void ui_menu_directory::custom_render(void *selectedref, float top, float bottom // ctor / dtor //------------------------------------------------- -ui_menu_display_actual::ui_menu_display_actual(running_machine &machine, render_container *container, int ref) +ui_menu_display_actual::ui_menu_display_actual(running_machine &machine, render_container *container, int ref) : ui_menu(machine, container), m_ref(ref) { } @@ -238,7 +237,7 @@ void ui_menu_display_actual::custom_render(void *selectedref, float top, float b y1 += UI_BOX_TB_BORDER; // draw the text within it - mui.draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + mui.draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); // compute our bounds @@ -376,7 +375,7 @@ void ui_menu_add_change_folder::handle() { machine().ui().options().set_value(s_folders[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string); } - else + else { if (strcmp(machine().options().value(s_folders[m_ref].option), m_current_path.c_str()) != 0) { @@ -401,7 +400,7 @@ void ui_menu_add_change_folder::handle() { machine().ui().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string); } - else + else { if (strcmp(machine().options().value(s_folders[m_ref].option), tmppath.c_str()) != 0) { @@ -582,9 +581,9 @@ void ui_menu_add_change_folder::custom_render(void *selectedref, float top, floa ui_menu_remove_folder::ui_menu_remove_folder(running_machine &machine, render_container *container, int ref) : ui_menu(machine, container) { m_ref = ref; - if (machine.ui().options().exists(s_folders[m_ref].option)) + if (machine.ui().options().exists(s_folders[m_ref].option)) m_searchpath.assign(machine.ui().options().value(s_folders[m_ref].option)); - else + else m_searchpath.assign(machine.options().value(s_folders[m_ref].option)); path_iterator path(m_searchpath.c_str()); @@ -620,11 +619,11 @@ void ui_menu_remove_folder::handle() { machine().ui().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string); } - else + else { if (strcmp(machine().options().value(s_folders[m_ref].option),tmppath.c_str())!=0) { - machine().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + machine().options().set_value(s_folders[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string); machine().options().mark_changed(s_folders[m_ref].option); } } @@ -679,6 +678,6 @@ void ui_menu_remove_folder::custom_render(void *selectedref, float top, float bo y1 += UI_BOX_TB_BORDER; // draw the text within it - mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, + mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } diff --git a/src/emu/ui/dsplmenu.cpp b/src/emu/ui/dsplmenu.cpp index 93cf3771133..c93bdd960ca 100644 --- a/src/emu/ui/dsplmenu.cpp +++ b/src/emu/ui/dsplmenu.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:BSD-3-Clause // copyright-holders:Dankan1890 /********************************************************************* @@ -23,10 +23,10 @@ ui_menu_display_options::video_modes ui_menu_display_options::m_video = { - { "auto", "Auto" }, - { "opengl", "OpenGL" }, - { "bgfx", "BGFX" }, - { "d3d", "Direct3D" }, + { "auto", "Auto" }, + { "opengl", "OpenGL" }, + { "bgfx", "BGFX" }, + { "d3d", "Direct3D" }, { "gdi", "GDI" }, { "ddraw", "DirectDraw" }, { "soft", "Software" }, @@ -107,20 +107,20 @@ ui_menu_display_options::ui_menu_display_options(running_machine &machine, rende ui_menu_display_options::~ui_menu_display_options() { std::string error_string; - for (int d = 2; d < ARRAY_LENGTH(m_options); ++d) + for (int d = 2; d < ARRAY_LENGTH(m_options); ++d) { if (machine().options().int_value(m_options[d].option) != m_options[d].status) { machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string); machine().options().mark_changed(m_options[d].option); - } + } } if (machine().options().value(m_options[1].option) != m_list[m_options[1].status]) { machine().options().set_value(m_options[1].option, m_list[m_options[1].status].c_str(), OPTION_PRIORITY_CMDLINE, error_string); machine().options().mark_changed(m_options[1].option); - } + } ui_globals::reset = true; } diff --git a/src/emu/ui/inifile.cpp b/src/emu/ui/inifile.cpp index 1c92b43a4d6..0c7d7a1a01b 100644 --- a/src/emu/ui/inifile.cpp +++ b/src/emu/ui/inifile.cpp @@ -142,7 +142,7 @@ void inifile_manager::load_ini_category(std::vector<int> &temp_filter) } //--------------------------------------------------------- -// parseopen - Open up file for reading +// parseopen - Open up file for reading //--------------------------------------------------------- bool inifile_manager::parseopen(const char *filename) @@ -303,7 +303,7 @@ bool favorite_manager::isgame_favorite() image_loaded = true; for (size_t current = 0; current < m_list.size(); current++) if (m_list[current].shortname == swinfo->shortname() && - m_list[current].listname == image->software_list_name()) + m_list[current].listname == image->software_list_name()) { m_current = current; return true; diff --git a/src/emu/ui/inifile.h b/src/emu/ui/inifile.h index 5a90b0d3d83..5c9e7ebdc65 100644 --- a/src/emu/ui/inifile.h +++ b/src/emu/ui/inifile.h @@ -70,7 +70,7 @@ private: // internal state running_machine &m_machine; // reference to our machine std::string m_fullpath; - FILE *fp = nullptr; + FILE *fp = nullptr; }; //------------------------------------------------- @@ -108,7 +108,7 @@ public: private: const char *favorite_filename = "favorites.ini"; - + // current int m_current; diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp index caf531c41ef..66381a3df1f 100644 --- a/src/emu/ui/mainmenu.cpp +++ b/src/emu/ui/mainmenu.cpp @@ -138,14 +138,14 @@ void ui_menu_main::populate() item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); /* add favorite menu */ - if (!machine().favorite().isgame_favorite()) + if (!machine().favorite().isgame_favorite()) item_append(_("Add To Favorites"), nullptr, 0, (void *)ADD_FAVORITE); else item_append(_("Remove From Favorites"), nullptr, 0, (void *)REMOVE_FAVORITE); item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); -// item_append(_("Quit from Machine"), nullptr, 0, (void *)QUIT_GAME); +// item_append(_("Quit from Machine"), nullptr, 0, (void *)QUIT_GAME); /* add reset and exit menus */ item_append(_("Select New Machine"), nullptr, 0, (void *)SELECT_GAME); @@ -246,7 +246,7 @@ void ui_menu_main::handle() ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine(), container, nullptr)); } else { ui_menu::stack_push(global_alloc_clear<ui_menu_select_game>(machine(), container, nullptr)); - } + } break; case BIOS_SELECTION: @@ -262,12 +262,12 @@ void ui_menu_main::handle() break; case ADD_FAVORITE: - machine().favorite().add_favorite_game(); + machine().favorite().add_favorite_game(); reset(UI_MENU_RESET_REMEMBER_POSITION); break; case REMOVE_FAVORITE: - machine().favorite().remove_favorite_game(); + machine().favorite().remove_favorite_game(); reset(UI_MENU_RESET_REMEMBER_POSITION); break; diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp index 3803790c359..4772b39e6fd 100644 --- a/src/emu/ui/menu.cpp +++ b/src/emu/ui/menu.cpp @@ -2,9 +2,9 @@ // copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods /********************************************************************* - ui/menu.c + ui/menu.c - Internal MAME menus for the user interface. + Internal MAME menus for the user interface. *********************************************************************/ @@ -27,7 +27,7 @@ /*************************************************************************** - CONSTANTS + CONSTANTS ***************************************************************************/ #define UI_MENU_POOL_SIZE 65536 @@ -68,7 +68,7 @@ static const char *hover_msg[] = { }; /*************************************************************************** - GLOBAL VARIABLES + GLOBAL VARIABLES ***************************************************************************/ ui_menu *ui_menu::menu_stack; @@ -93,7 +93,7 @@ bitmap_argb32 *ui_menu::toolbar_bitmap[UI_TOOLBAR_BUTTONS]; bitmap_argb32 *ui_menu::sw_toolbar_bitmap[UI_TOOLBAR_BUTTONS]; /*************************************************************************** - INLINE FUNCTIONS + INLINE FUNCTIONS ***************************************************************************/ //------------------------------------------------- @@ -126,7 +126,7 @@ inline bool ui_menu::exclusive_input_pressed(int key, int repeat) /*************************************************************************** - CORE SYSTEM MANAGEMENT + CORE SYSTEM MANAGEMENT ***************************************************************************/ //------------------------------------------------- @@ -193,7 +193,7 @@ void ui_menu::exit(running_machine &machine) /*************************************************************************** - CORE MENU MANAGEMENT + CORE MENU MANAGEMENT ***************************************************************************/ //------------------------------------------------- @@ -334,7 +334,7 @@ const ui_menu_event *ui_menu::process(UINT32 flags) menu_event.iptkey = IPT_INVALID; // first make sure our selection is valid -// if (!(flags & UI_MENU_PROCESS_NOINPUT)) +// if (!(flags & UI_MENU_PROCESS_NOINPUT)) validate_selection(1); // draw the menu @@ -451,7 +451,7 @@ void ui_menu::set_selection(void *selected_itemref) /*************************************************************************** - INTERNAL MENU PROCESSING + INTERNAL MENU PROCESSING ***************************************************************************/ //------------------------------------------------- @@ -713,7 +713,7 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) // compute the multi-line target width/height machine().ui().draw_text_full(container, pitem.subtext, 0, 0, visible_width * 0.75f, - JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); + JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); // determine the target location target_x = visible_left + visible_width - target_width - UI_BOX_LR_BORDER; @@ -725,8 +725,8 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER, target_y - UI_BOX_TB_BORDER, target_x + target_width + UI_BOX_LR_BORDER, - target_y + target_height + UI_BOX_TB_BORDER, - subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR); + target_y + target_height + UI_BOX_TB_BORDER, + subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR); machine().ui().draw_text_full(container, pitem.subtext, target_x, target_y, target_width, JUSTIFY_RIGHT, WRAP_WORD, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr); } @@ -736,8 +736,8 @@ void ui_menu::draw(bool customonly, bool noimage, bool noinput) // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size()); -// if (history_flag && (top_line + visible_lines >= item.size())) -// selected = item.size() - 1; +// if (history_flag && (top_line + visible_lines >= item.size())) +// selected = item.size() - 1; } void ui_menu::custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) @@ -762,7 +762,7 @@ void ui_menu::draw_text_box() // compute the multi-line target width/height machine().ui().draw_text_full(container, text, 0, 0, 1.0f - 2.0f * UI_BOX_LR_BORDER - 2.0f * gutter_width, - JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); + JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); target_height += 2.0f * line_height; if (target_height > 1.0f - 2.0f * UI_BOX_TB_BORDER) target_height = floorf((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height; @@ -787,20 +787,20 @@ void ui_menu::draw_text_box() // add a box around that machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER - gutter_width, - target_y - UI_BOX_TB_BORDER, - target_x + target_width + gutter_width + UI_BOX_LR_BORDER, - target_y + target_height + UI_BOX_TB_BORDER, - (item[0].flags & MENU_FLAG_REDTEXT) ? UI_RED_COLOR : UI_BACKGROUND_COLOR); + target_y - UI_BOX_TB_BORDER, + target_x + target_width + gutter_width + UI_BOX_LR_BORDER, + target_y + target_height + UI_BOX_TB_BORDER, + (item[0].flags & MENU_FLAG_REDTEXT) ? UI_RED_COLOR : UI_BACKGROUND_COLOR); machine().ui().draw_text_full(container, text, target_x, target_y, target_width, JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); // draw the "return to prior menu" text with a hilight behind it highlight(container, - target_x + 0.5f * UI_LINE_WIDTH, - target_y + target_height - line_height, - target_x + target_width - 0.5f * UI_LINE_WIDTH, - target_y + target_height, - UI_SELECTED_BG_COLOR); + target_x + 0.5f * UI_LINE_WIDTH, + target_y + target_height - line_height, + target_x + target_width - 0.5f * UI_LINE_WIDTH, + target_y + target_height, + UI_SELECTED_BG_COLOR); machine().ui().draw_text_full(container, backtext, target_x, target_y + target_height - line_height, target_width, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr); @@ -1097,7 +1097,7 @@ void ui_menu::clear_free_list(running_machine &machine) /*************************************************************************** - MENU STACK MANAGEMENT + MENU STACK MANAGEMENT ***************************************************************************/ //------------------------------------------------- @@ -1167,7 +1167,7 @@ void ui_menu::do_handle() /*************************************************************************** - UI SYSTEM INTERACTION + UI SYSTEM INTERACTION ***************************************************************************/ //------------------------------------------------- @@ -1196,7 +1196,7 @@ UINT32 ui_menu::ui_handler(running_machine &machine, render_container *container } /*************************************************************************** - MENU HELPERS + MENU HELPERS ***************************************************************************/ //------------------------------------------------- @@ -1848,7 +1848,7 @@ void ui_menu::handle_main_keys(UINT32 flags) if (menu_event.iptkey == IPT_INVALID) for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++) { - if (ui_error || code == IPT_UI_CONFIGURE || (code == IPT_UI_LEFT && ignoreleft) || (code == IPT_UI_RIGHT && ignoreright) || (code == IPT_UI_PAUSE && ignorepause)) + if (ui_error || code == IPT_UI_CONFIGURE || (code == IPT_UI_LEFT && ignoreleft) || (code == IPT_UI_RIGHT && ignoreright) || (code == IPT_UI_PAUSE && ignorepause)) continue; if (exclusive_input_pressed(code, 0)) @@ -2768,4 +2768,4 @@ void ui_menu::draw_dats_menu() // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items); -}
\ No newline at end of file +} diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h index d5f5e8a33e6..a19cb0b23dc 100644 --- a/src/emu/ui/menu.h +++ b/src/emu/ui/menu.h @@ -2,9 +2,9 @@ // copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods /*************************************************************************** - ui/menu.h + ui/menu.h - Internal MAME menus for the user interface. + Internal MAME menus for the user interface. ***************************************************************************/ @@ -17,7 +17,7 @@ /*************************************************************************** - CONSTANTS + CONSTANTS ***************************************************************************/ // flags for menu items @@ -55,7 +55,7 @@ enum ui_menu_reset_options /*************************************************************************** - TYPE DEFINITIONS + TYPE DEFINITIONS ***************************************************************************/ // menu-related events @@ -255,7 +255,7 @@ protected: static render_texture *hilight_main_texture; private: static std::unique_ptr<bitmap_argb32> no_avail_bitmap, bgrnd_bitmap, star_bitmap; -// static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap; +// static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap; static render_texture *bgrnd_texture, *star_texture; static bitmap_argb32 *icons_bitmap[]; static render_texture *icons_texture[]; diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp index 5d232729bd2..cd99d0b6820 100644 --- a/src/emu/ui/miscmenu.cpp +++ b/src/emu/ui/miscmenu.cpp @@ -651,7 +651,7 @@ void ui_menu_misc_options::custom_render(void *selectedref, float top, float bot ui_manager &mui = machine().ui(); mui.draw_text_full(container, _("Miscellaneous Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; float maxwidth = MAX(origx2 - origx1, width); @@ -671,5 +671,5 @@ void ui_menu_misc_options::custom_render(void *selectedref, float top, float bot // draw the text within it mui.draw_text_full(container, _("Miscellaneous Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } diff --git a/src/emu/ui/moptions.cpp b/src/emu/ui/moptions.cpp index 63c51d26438..4ab64fb38f7 100644 --- a/src/emu/ui/moptions.cpp +++ b/src/emu/ui/moptions.cpp @@ -19,61 +19,61 @@ const options_entry ui_options::s_option_entries[] = { // seach path options - { nullptr, nullptr, OPTION_HEADER, "UI SEARCH PATH OPTIONS" }, - { OPTION_HISTORY_PATH, "history;dats;.", OPTION_STRING, "path to history files" }, - { OPTION_EXTRAINI_PATH, "folders", OPTION_STRING, "path to extra ini files" }, - { OPTION_CABINETS_PATH, "cabinets;cabdevs", OPTION_STRING, "path to cabinets / devices image" }, - { OPTION_CPANELS_PATH, "cpanel", OPTION_STRING, "path to control panel image" }, - { OPTION_PCBS_PATH, "pcb", OPTION_STRING, "path to pcbs image" }, - { OPTION_FLYERS_PATH, "flyers", OPTION_STRING, "path to flyers image" }, - { OPTION_TITLES_PATH, "titles", OPTION_STRING, "path to titles image" }, - { OPTION_ENDS_PATH, "ends", OPTION_STRING, "path to ends image" }, - { OPTION_MARQUEES_PATH, "marquees", OPTION_STRING, "path to marquees image" }, - { OPTION_ARTPREV_PATH, "artwork preview", OPTION_STRING, "path to artwork preview image" }, - { OPTION_BOSSES_PATH, "bosses", OPTION_STRING, "path to bosses image" }, - { OPTION_LOGOS_PATH, "logo", OPTION_STRING, "path to logos image" }, - { OPTION_SCORES_PATH, "scores", OPTION_STRING, "path to scores image" }, - { OPTION_VERSUS_PATH, "versus", OPTION_STRING, "path to versus image" }, - { OPTION_GAMEOVER_PATH, "gameover", OPTION_STRING, "path to gameover image" }, - { OPTION_HOWTO_PATH, "howto", OPTION_STRING, "path to howto image" }, - { OPTION_SELECT_PATH, "select", OPTION_STRING, "path to select image" }, - { OPTION_ICONS_PATH, "icons", OPTION_STRING, "path to ICOns image" }, - { OPTION_UI_PATH, "ui", OPTION_STRING, "path to UI files" }, + { nullptr, nullptr, OPTION_HEADER, "UI SEARCH PATH OPTIONS" }, + { OPTION_HISTORY_PATH, "history;dats;.", OPTION_STRING, "path to history files" }, + { OPTION_EXTRAINI_PATH, "folders", OPTION_STRING, "path to extra ini files" }, + { OPTION_CABINETS_PATH, "cabinets;cabdevs", OPTION_STRING, "path to cabinets / devices image" }, + { OPTION_CPANELS_PATH, "cpanel", OPTION_STRING, "path to control panel image" }, + { OPTION_PCBS_PATH, "pcb", OPTION_STRING, "path to pcbs image" }, + { OPTION_FLYERS_PATH, "flyers", OPTION_STRING, "path to flyers image" }, + { OPTION_TITLES_PATH, "titles", OPTION_STRING, "path to titles image" }, + { OPTION_ENDS_PATH, "ends", OPTION_STRING, "path to ends image" }, + { OPTION_MARQUEES_PATH, "marquees", OPTION_STRING, "path to marquees image" }, + { OPTION_ARTPREV_PATH, "artwork preview", OPTION_STRING, "path to artwork preview image" }, + { OPTION_BOSSES_PATH, "bosses", OPTION_STRING, "path to bosses image" }, + { OPTION_LOGOS_PATH, "logo", OPTION_STRING, "path to logos image" }, + { OPTION_SCORES_PATH, "scores", OPTION_STRING, "path to scores image" }, + { OPTION_VERSUS_PATH, "versus", OPTION_STRING, "path to versus image" }, + { OPTION_GAMEOVER_PATH, "gameover", OPTION_STRING, "path to gameover image" }, + { OPTION_HOWTO_PATH, "howto", OPTION_STRING, "path to howto image" }, + { OPTION_SELECT_PATH, "select", OPTION_STRING, "path to select image" }, + { OPTION_ICONS_PATH, "icons", OPTION_STRING, "path to ICOns image" }, + { OPTION_UI_PATH, "ui", OPTION_STRING, "path to UI files" }, // misc options - { nullptr, nullptr, OPTION_HEADER, "UI MISC OPTIONS" }, - { OPTION_DATS_ENABLED, "1", OPTION_BOOLEAN, "enable DATs support" }, - { OPTION_REMEMBER_LAST, "1", OPTION_BOOLEAN, "reselect in main menu last played game" }, - { OPTION_ENLARGE_SNAPS, "1", OPTION_BOOLEAN, "enlarge arts (snapshot, title, etc...) in right panel (keeping aspect ratio)" }, - { OPTION_FORCED4X3, "1", OPTION_BOOLEAN, "force the appearance of the snapshot in the list software to 4:3" }, - { OPTION_USE_BACKGROUND, "1", OPTION_BOOLEAN, "enable background image in main view" }, - { OPTION_SKIP_BIOS_MENU, "0", OPTION_BOOLEAN, "skip bios submenu, start with configured or default" }, - { OPTION_SKIP_PARTS_MENU, "0", OPTION_BOOLEAN, "skip parts submenu, start with first part" }, - { OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" }, - { OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" }, - { OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" }, + { nullptr, nullptr, OPTION_HEADER, "UI MISC OPTIONS" }, + { OPTION_DATS_ENABLED, "1", OPTION_BOOLEAN, "enable DATs support" }, + { OPTION_REMEMBER_LAST, "1", OPTION_BOOLEAN, "reselect in main menu last played game" }, + { OPTION_ENLARGE_SNAPS, "1", OPTION_BOOLEAN, "enlarge arts (snapshot, title, etc...) in right panel (keeping aspect ratio)" }, + { OPTION_FORCED4X3, "1", OPTION_BOOLEAN, "force the appearance of the snapshot in the list software to 4:3" }, + { OPTION_USE_BACKGROUND, "1", OPTION_BOOLEAN, "enable background image in main view" }, + { OPTION_SKIP_BIOS_MENU, "0", OPTION_BOOLEAN, "skip bios submenu, start with configured or default" }, + { OPTION_SKIP_PARTS_MENU, "0", OPTION_BOOLEAN, "skip parts submenu, start with first part" }, + { OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" }, + { OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" }, + { OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" }, // UI options - { nullptr, nullptr, OPTION_HEADER, "UI OPTIONS" }, - { OPTION_INFOS_SIZE "(0.05-1.00)", "0.75", OPTION_FLOAT, "UI right panel infos text size (0.05 - 1.00)" }, - { OPTION_FONT_ROWS "(25-40)", "30", OPTION_INTEGER, "UI font text size (25 - 40)" }, - { OPTION_HIDE_PANELS "(0-3)", "0", OPTION_INTEGER, "UI hide left/right panel in main view (0 = Show all, 1 = hide left, 2 = hide right, 3 = hide both" }, - { OPTION_UI_BORDER_COLOR, "ffffffff", OPTION_STRING, "UI border color (ARGB)" }, - { OPTION_UI_BACKGROUND_COLOR, "ef101030", OPTION_STRING, "UI background color (ARGB)" }, - { OPTION_UI_CLONE_COLOR, "ff808080", OPTION_STRING, "UI clone color (ARGB)" }, - { OPTION_UI_DIPSW_COLOR, "ffffff00", OPTION_STRING, "UI dipswitch color (ARGB)" }, - { OPTION_UI_GFXVIEWER_BG_COLOR, "ef101030", OPTION_STRING, "UI gfx viewer color (ARGB)" }, - { OPTION_UI_MOUSEDOWN_BG_COLOR, "b0606000", OPTION_STRING, "UI mouse down bg color (ARGB)" }, - { OPTION_UI_MOUSEDOWN_COLOR, "ffffff80", OPTION_STRING, "UI mouse down color (ARGB)" }, - { OPTION_UI_MOUSEOVER_BG_COLOR, "70404000", OPTION_STRING, "UI mouse over bg color (ARGB)" }, - { OPTION_UI_MOUSEOVER_COLOR, "ffffff80", OPTION_STRING, "UI mouse over color (ARGB)" }, - { OPTION_UI_SELECTED_BG_COLOR, "ef808000", OPTION_STRING, "UI selected bg color (ARGB)" }, - { OPTION_UI_SELECTED_COLOR, "ffffff00", OPTION_STRING, "UI selected color (ARGB)" }, - { OPTION_UI_SLIDER_COLOR, "ffffffff", OPTION_STRING, "UI slider color (ARGB)" }, - { OPTION_UI_SUBITEM_COLOR, "ffffffff", OPTION_STRING, "UI subitem color (ARGB)" }, - { OPTION_UI_TEXT_BG_COLOR, "ef000000", OPTION_STRING, "UI text bg color (ARGB)" }, - { OPTION_UI_TEXT_COLOR, "ffffffff", OPTION_STRING, "UI text color (ARGB)" }, - { OPTION_UI_UNAVAILABLE_COLOR, "ff404040", OPTION_STRING, "UI unavailable color (ARGB)" }, + { nullptr, nullptr, OPTION_HEADER, "UI OPTIONS" }, + { OPTION_INFOS_SIZE "(0.05-1.00)", "0.75", OPTION_FLOAT, "UI right panel infos text size (0.05 - 1.00)" }, + { OPTION_FONT_ROWS "(25-40)", "30", OPTION_INTEGER, "UI font text size (25 - 40)" }, + { OPTION_HIDE_PANELS "(0-3)", "0", OPTION_INTEGER, "UI hide left/right panel in main view (0 = Show all, 1 = hide left, 2 = hide right, 3 = hide both" }, + { OPTION_UI_BORDER_COLOR, "ffffffff", OPTION_STRING, "UI border color (ARGB)" }, + { OPTION_UI_BACKGROUND_COLOR, "ef101030", OPTION_STRING, "UI background color (ARGB)" }, + { OPTION_UI_CLONE_COLOR, "ff808080", OPTION_STRING, "UI clone color (ARGB)" }, + { OPTION_UI_DIPSW_COLOR, "ffffff00", OPTION_STRING, "UI dipswitch color (ARGB)" }, + { OPTION_UI_GFXVIEWER_BG_COLOR, "ef101030", OPTION_STRING, "UI gfx viewer color (ARGB)" }, + { OPTION_UI_MOUSEDOWN_BG_COLOR, "b0606000", OPTION_STRING, "UI mouse down bg color (ARGB)" }, + { OPTION_UI_MOUSEDOWN_COLOR, "ffffff80", OPTION_STRING, "UI mouse down color (ARGB)" }, + { OPTION_UI_MOUSEOVER_BG_COLOR, "70404000", OPTION_STRING, "UI mouse over bg color (ARGB)" }, + { OPTION_UI_MOUSEOVER_COLOR, "ffffff80", OPTION_STRING, "UI mouse over color (ARGB)" }, + { OPTION_UI_SELECTED_BG_COLOR, "ef808000", OPTION_STRING, "UI selected bg color (ARGB)" }, + { OPTION_UI_SELECTED_COLOR, "ffffff00", OPTION_STRING, "UI selected color (ARGB)" }, + { OPTION_UI_SLIDER_COLOR, "ffffffff", OPTION_STRING, "UI slider color (ARGB)" }, + { OPTION_UI_SUBITEM_COLOR, "ffffffff", OPTION_STRING, "UI subitem color (ARGB)" }, + { OPTION_UI_TEXT_BG_COLOR, "ef000000", OPTION_STRING, "UI text bg color (ARGB)" }, + { OPTION_UI_TEXT_COLOR, "ffffffff", OPTION_STRING, "UI text color (ARGB)" }, + { OPTION_UI_UNAVAILABLE_COLOR, "ff404040", OPTION_STRING, "UI unavailable color (ARGB)" }, { nullptr } }; diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp index 54e269bf4ed..29ada94b08e 100644 --- a/src/emu/ui/optsmenu.cpp +++ b/src/emu/ui/optsmenu.cpp @@ -52,8 +52,8 @@ void ui_menu_game_options::handle() bool changed = false; // process the menu -// ui_menu::menu_stack->parent->process(UI_MENU_PROCESS_NOINPUT); -// const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT | UI_MENU_PROCESS_NOIMAGE); +// ui_menu::menu_stack->parent->process(UI_MENU_PROCESS_NOINPUT); +// const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT | UI_MENU_PROCESS_NOIMAGE); const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT); if (m_event != nullptr && m_event->itemref != nullptr) @@ -191,8 +191,8 @@ void ui_menu_game_options::handle() void ui_menu_game_options::populate() { - if (strcmp(machine().options().ui(),"simple")!=0) - { + if (strcmp(machine().options().ui(),"simple")!=0) + { // set filter arrow std::string fbuff; @@ -265,7 +265,7 @@ void ui_menu_game_options::custom_render(void *selectedref, float top, float bot float width; ui_manager &mui = machine().ui(); mui.draw_text_full(container, _("Settings"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; float maxwidth = MAX(origx2 - origx1, width); @@ -285,7 +285,7 @@ void ui_menu_game_options::custom_render(void *selectedref, float top, float bot // draw the text within it mui.draw_text_full(container, _("Settings"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } //------------------------------------------------- diff --git a/src/emu/ui/selector.cpp b/src/emu/ui/selector.cpp index f4c94e6bc2d..ae786dd1834 100644 --- a/src/emu/ui/selector.cpp +++ b/src/emu/ui/selector.cpp @@ -18,7 +18,7 @@ // ctor / dtor //------------------------------------------------- -ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> s_sel, UINT16 &s_actual, int category, int _hover) +ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> s_sel, UINT16 &s_actual, int category, int _hover) : ui_menu(machine, container), m_selector(s_actual) { m_category = category; @@ -152,7 +152,7 @@ void ui_menu_selector::custom_render(void *selectedref, float top, float bottom, std::string tempbuf = std::string(_("Selection List - Search: ")).append(m_search).append("_"); // get the size of the text - mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; float maxwidth = MAX(width, origx2 - origx1); @@ -172,7 +172,7 @@ void ui_menu_selector::custom_render(void *selectedref, float top, float bottom, y1 += UI_BOX_TB_BORDER; // draw the text within it - mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); // bottom text @@ -180,7 +180,7 @@ void ui_menu_selector::custom_render(void *selectedref, float top, float bottom, std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD)); tempbuf.assign(_("Double click or press ")).append(ui_select_text).append(_(" to select")); - mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); @@ -200,7 +200,7 @@ void ui_menu_selector::custom_render(void *selectedref, float top, float bottom, y1 += UI_BOX_TB_BORDER; // draw the text within it - mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp index e950c96b1b9..8aebd63772b 100644 --- a/src/emu/ui/selgame.cpp +++ b/src/emu/ui/selgame.cpp @@ -131,7 +131,7 @@ void save_main_option(running_machine &machine) for (emu_options::entry *f_entry = machine.options().first(); f_entry != nullptr; f_entry = f_entry->next()) { - if (f_entry->is_changed()) + if (f_entry->is_changed()) { options.set_value(f_entry->name(), f_entry->value(), OPTION_PRIORITY_CMDLINE, error_string); } @@ -150,7 +150,7 @@ void save_main_option(running_machine &machine) else { machine.popmessage("**Error to save %s.ini**", emulator_info::get_configname()); return; - } + } } machine.ui().popup_time(3, "\n Configuration saved \n\n"); } @@ -484,7 +484,7 @@ void ui_menu_select_game::handle() // if we're in an error state, overlay an error message if (ui_error) - machine().ui().draw_text_box(container, "The selected machine is missing one or more required ROM or CHD images. " + machine().ui().draw_text_box(container, "The selected machine is missing one or more required ROM or CHD images. " "Please select a different machine.\n\nPress any key (except ESC) to continue.", JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR); // handle filters selection from key shortcuts @@ -723,7 +723,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott ui_manager &mui = machine().ui(); float tbarspace = mui.get_line_height(); - strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios); + strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios); std::string filtered; if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty()) @@ -749,7 +749,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott for (int line = 0; line < 2; ++line) { mui.draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(width, maxwidth); } @@ -771,7 +771,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott // draw the text within it for (int line = 0; line < 2; ++line) { - mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); y1 += mui.get_line_height(); } @@ -828,7 +828,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott color = UI_GREEN_COLOR; if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS - | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0) + | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0) color = UI_YELLOW_COLOR; if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0) @@ -896,7 +896,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott for (auto & elem : tempbuf) { - mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); @@ -968,7 +968,7 @@ void ui_menu_select_game::inkey_select(const ui_menu_event *m_event) ui_menu::stack_push(global_alloc_clear<ui_menu_directory>(machine(), container)); // anything else is a driver else if ((FPTR)driver == 3) { - save_main_option(machine()); + save_main_option(machine()); } // anything else is a driver else @@ -1413,7 +1413,7 @@ void ui_menu_select_game::populate_search() if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) cloneof = false; } - item_append(m_searchlist[curitem]->description, nullptr, (!cloneof) ? flags_ui : (MENU_FLAG_INVERT | flags_ui), + item_append(m_searchlist[curitem]->description, nullptr, (!cloneof) ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)m_searchlist[curitem]); } } @@ -1758,11 +1758,11 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y hover = phover + filter; } -/* if (afilter == filter) - { - bgcolor = UI_SELECTED_BG_COLOR; - fgcolor = UI_SELECTED_COLOR; - } +/* if (afilter == filter) + { + bgcolor = UI_SELECTED_BG_COLOR; + fgcolor = UI_SELECTED_COLOR; + } */ if (bgcolor != UI_TEXT_BG_COLOR) container->add_rect(x1, y1, x2, y1 + line_height_max, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); @@ -1797,7 +1797,7 @@ float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y convert_command_glyph(str); } - mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER, + mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size); y1 += line_height_max; } @@ -1905,13 +1905,13 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or for (int x = UI_FIRST_LOAD; x < UI_LAST_LOAD; ++x) { - mui.draw_text_full(container, dats_info[x], origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, + mui.draw_text_full(container, dats_info[x], origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr); txt_lenght += 0.01f; title_size = MAX(txt_lenght, title_size); } - mui.draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, + mui.draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curdats_view, UI_FIRST_LOAD, UI_LAST_LOAD, title_size); @@ -1948,7 +1948,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or if (buffer.empty()) { - mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER, + mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); return; } @@ -2002,7 +2002,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &item_width, nullptr, tmp_size); 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, + 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); } } @@ -2022,18 +2022,18 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or std::string first_part(tempbuf.substr(0, first_dspace)); 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, + 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); - mui.draw_text_full(container, last_part.c_str(), effective_left, oy1, origx2 - origx1 - 2.0f * gutter_width, + 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); } else - mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT, + 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); } else - mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT, + 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, text_size); oy1 += (line_height * text_size); @@ -2065,13 +2065,13 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or for (auto & elem: t_text) { - mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, + mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr); txt_lenght += 0.01f; title_size = MAX(txt_lenght, title_size); } - mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1, + mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size); @@ -2122,7 +2122,7 @@ void ui_menu_select_game::infos_render(void *selectedref, float origx1, float or else if (r == r_visible_lines - 1 && itemline != totallines - 1) info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width); else - mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT, + 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, text_size); oy1 += (line_height * text_size); } diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp index 3122f286917..ad374bb9b83 100644 --- a/src/emu/ui/selsoft.cpp +++ b/src/emu/ui/selsoft.cpp @@ -1,4 +1,4 @@ -// license:BSD-3-Clause +// license:BSD-3-Clause // copyright-holders:Dankan1890 /*************************************************************************** @@ -29,9 +29,9 @@ std::string reselect_last::software; std::string reselect_last::swlist; bool reselect_last::m_reselect = false; static const char *region_lists[] = { "arab", "arg", "asia", "aus", "aut", "bel", "blr", "bra", "can", "chi", "chn", "cze", "den", - "ecu", "esp", "euro", "fin", "fra", "gbr", "ger", "gre", "hkg", "hun", "irl", "isr", - "isv", "ita", "jpn", "kaz", "kor", "lat", "lux", "mex", "ned", "nld", "nor", "nzl", - "pol", "rus", "slo", "spa", "sui", "swe", "tha", "tpe", "tw", "uk", "ukr", "usa" }; + "ecu", "esp", "euro", "fin", "fra", "gbr", "ger", "gre", "hkg", "hun", "irl", "isr", + "isv", "ita", "jpn", "kaz", "kor", "lat", "lux", "mex", "ned", "nld", "nor", "nzl", + "pol", "rus", "slo", "spa", "sui", "swe", "tha", "tpe", "tw", "uk", "ukr", "usa" }; //------------------------------------------------- // compares two items in the software list and @@ -424,7 +424,7 @@ void ui_menu_select_software::populate() old_software = m_has_empty_start ? curitem + 1 : curitem; item_append(m_displaylist[curitem]->longname.c_str(), m_displaylist[curitem]->devicetype.c_str(), - m_displaylist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)m_displaylist[curitem]); + m_displaylist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)m_displaylist[curitem]); } } @@ -434,8 +434,8 @@ void ui_menu_select_software::populate() for (int curitem = 0; m_searchlist[curitem] != nullptr; ++curitem) item_append(m_searchlist[curitem]->longname.c_str(), m_searchlist[curitem]->devicetype.c_str(), - m_searchlist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), - (void *)m_searchlist[curitem]); + m_searchlist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), + (void *)m_searchlist[curitem]); } item_append(MENU_SEPARATOR_ITEM, nullptr, flags_ui, nullptr); @@ -636,7 +636,7 @@ void ui_menu_select_software::custom_render(void *selectedref, float top, float for (int line = 0; line < 3; ++line) { mui.draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(width, maxwidth); } @@ -659,7 +659,7 @@ void ui_menu_select_software::custom_render(void *selectedref, float top, float for (int line = 0; line < 3; ++line) { mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); y1 += mui.get_line_height(); } @@ -781,7 +781,7 @@ void ui_menu_select_software::custom_render(void *selectedref, float top, float for (auto & elem : tempbuf) { mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); } @@ -808,7 +808,7 @@ void ui_menu_select_software::custom_render(void *selectedref, float top, float for (auto & elem : tempbuf) { mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); y1 += machine().ui().get_line_height(); } } @@ -1088,7 +1088,6 @@ std::string c_sw_publisher::getname(std::string &str) //------------------------------------------------- void ui_menu_select_software::build_list(std::vector<ui_software_info *> &s_drivers, const char *filter_text, int filter) { - if (s_drivers.empty() && filter == -1) { filter = sw_filters::actual; @@ -1319,11 +1318,11 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo hover = phover + filter; } -/* if (afilter == filter) - { - bgcolor = UI_SELECTED_BG_COLOR; - fgcolor = UI_SELECTED_COLOR; - } +/* if (afilter == filter) + { + bgcolor = UI_SELECTED_BG_COLOR; + fgcolor = UI_SELECTED_COLOR; + } */ if (bgcolor != UI_TEXT_BG_COLOR) container->add_rect(x1, y1, x2, y1 + line_height, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); @@ -1359,7 +1358,7 @@ float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, flo } mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER, - DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size); + DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size); y1 += line_height; } @@ -1439,7 +1438,7 @@ void ui_menu_select_software::infos_render(void *selectedref, float origx1, floa if (soft && soft->usage.empty()) { mui.draw_text_full(container, _("History"), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); ui_globals::cur_sw_dats_view = 0; } else @@ -1453,14 +1452,14 @@ void ui_menu_select_software::infos_render(void *selectedref, float origx1, floa for (auto & elem : t_text) { mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr); + DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr); txt_lenght += 0.01f; title_size = MAX(txt_lenght, title_size); } mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1, - JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, - nullptr, nullptr); + JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, + nullptr, nullptr); draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size); } @@ -1484,7 +1483,7 @@ void ui_menu_select_software::infos_render(void *selectedref, float origx1, floa if (buffer.empty()) { mui.draw_text_full(container, _("No Infos Available"), origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER, - WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); return; } else @@ -1512,8 +1511,8 @@ void ui_menu_select_software::infos_render(void *selectedref, float origx1, floa info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width); 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, text_size); + JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, + nullptr, nullptr, text_size); oy1 += (line_height * text_size); } @@ -1820,7 +1819,7 @@ void ui_software_parts::custom_render(void *selectedref, float top, float bottom float width; ui_manager &mui = machine().ui(); mui.draw_text_full(container, _("Software part selection:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; float maxwidth = MAX(origx2 - origx1, width); @@ -1840,7 +1839,7 @@ void ui_software_parts::custom_render(void *selectedref, float top, float bottom // draw the text within it mui.draw_text_full(container, _("Software part selection:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } //------------------------------------------------- @@ -1958,7 +1957,7 @@ void ui_bios_selection::custom_render(void *selectedref, float top, float bottom float width; ui_manager &mui = machine().ui(); mui.draw_text_full(container, _("Bios selection:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; float maxwidth = MAX(origx2 - origx1, width); @@ -1978,5 +1977,5 @@ void ui_bios_selection::custom_render(void *selectedref, float top, float bottom // draw the text within it mui.draw_text_full(container, _("Bios selection:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } diff --git a/src/emu/ui/sndmenu.cpp b/src/emu/ui/sndmenu.cpp index 37134f8db25..cc5e8490406 100644 --- a/src/emu/ui/sndmenu.cpp +++ b/src/emu/ui/sndmenu.cpp @@ -150,7 +150,7 @@ void ui_menu_sound_options::custom_render(void *selectedref, float top, float bo float width; ui_manager &mui = machine().ui(); mui.draw_text_full(container, _("Sound Options"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; float maxwidth = MAX(origx2 - origx1, width); @@ -170,5 +170,5 @@ void ui_menu_sound_options::custom_render(void *selectedref, float top, float bo // draw the text within it mui.draw_text_full(container, _("Sound Options"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); } diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index f3ce51feea6..b474c7c61f6 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -1698,12 +1698,12 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co if (machine.ui_input().pressed(IPT_UI_PAUSE)) { // with a shift key, it is single step -// if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT))) -// { -// machine.ui().set_single_step(true); -// machine.resume(); -// } -// else +// if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT))) +// { +// machine.ui().set_single_step(true); +// machine.resume(); +// } +// else machine.toggle_pause(); } @@ -2702,8 +2702,8 @@ int ui_manager::wrap_text(render_container *container, const char *origs, float if (curwidth > maxwidth) maxwidth = curwidth; - xstart.push_back(linestart - origs); - xend.push_back(s - origs); + xstart.push_back(linestart - origs); + xend.push_back(s - origs); // loop from the line start and add the characters while (linestart < s) diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h index ffd2fddc371..81034500733 100644 --- a/src/emu/ui/ui.h +++ b/src/emu/ui/ui.h @@ -103,9 +103,9 @@ struct slider_state INT32 defval; /* default value */ INT32 maxval; /* maximum value */ INT32 incval; /* increment value */ - bool hidden; /* hidden or not */ - INT32 id; /* unique identifier */ - char description[1]; /* textual description */ + bool hidden; /* hidden or not */ + INT32 id; /* unique identifier */ + char description[1]; /* textual description */ }; @@ -114,111 +114,111 @@ struct slider_state class ui_manager { public: - // construction/destruction - ui_manager(running_machine &machine); + // construction/destruction + ui_manager(running_machine &machine); void init(); - // getters - running_machine &machine() const { return m_machine; } - bool single_step() const { return m_single_step; } + // getters + running_machine &machine() const { return m_machine; } + bool single_step() const { return m_single_step; } ui_options &options() { return m_ui_options; } - // setters - void set_single_step(bool single_step) { m_single_step = single_step; } - - // methods - void initialize(running_machine &machine); - UINT32 set_handler(ui_callback callback, UINT32 param); - void display_startup_screens(bool first_time, bool show_disclaimer); - void set_startup_text(const char *text, bool force); - void update_and_render(render_container *container); - render_font *get_font(); - float get_line_height(); - float get_char_width(unicode_char ch); - float get_string_width(const char *s); - void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor); - void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor); - void draw_text(render_container *container, const char *buf, float x, float y); + // setters + void set_single_step(bool single_step) { m_single_step = single_step; } + + // methods + void initialize(running_machine &machine); + UINT32 set_handler(ui_callback callback, UINT32 param); + void display_startup_screens(bool first_time, bool show_disclaimer); + void set_startup_text(const char *text, bool force); + void update_and_render(render_container *container); + render_font *get_font(); + float get_line_height(); + float get_char_width(unicode_char ch); + float get_string_width(const char *s); + void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor); + void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor); + void draw_text(render_container *container, const char *buf, float x, float y); void draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth = nullptr, float *totalheight = nullptr, float text_size = 1.0f); void draw_text_box(render_container *container, const char *text, int justify, float xpos, float ypos, rgb_t backcolor); - void draw_message_window(render_container *container, const char *text); - - void CLIB_DECL popup_time(int seconds, const char *text, ...) ATTR_PRINTF(3,4); - void show_fps_temp(double seconds); - void set_show_fps(bool show); - bool show_fps() const; - bool show_fps_counter(); - void set_show_profiler(bool show); - bool show_profiler() const; - void show_menu(); - void show_mouse(bool status); - bool is_menu_active(); - bool can_paste(); - void paste(); - bool use_natural_keyboard() const; - void set_use_natural_keyboard(bool use_natural_keyboard); - void image_handler_ingame(); - void increase_frameskip(); - void decrease_frameskip(); - void request_quit(); - - // print the game info string into a buffer - std::string &game_info_astring(std::string &str); - - // slider controls - const slider_state *get_slider_list(void); - - // other - void process_natural_keyboard(); - - void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; } - bool show_timecode_counter(); - bool show_timecode_total(); + void draw_message_window(render_container *container, const char *text); + + void CLIB_DECL popup_time(int seconds, const char *text, ...) ATTR_PRINTF(3,4); + void show_fps_temp(double seconds); + void set_show_fps(bool show); + bool show_fps() const; + bool show_fps_counter(); + void set_show_profiler(bool show); + bool show_profiler() const; + void show_menu(); + void show_mouse(bool status); + bool is_menu_active(); + bool can_paste(); + void paste(); + bool use_natural_keyboard() const; + void set_use_natural_keyboard(bool use_natural_keyboard); + void image_handler_ingame(); + void increase_frameskip(); + void decrease_frameskip(); + void request_quit(); + + // print the game info string into a buffer + std::string &game_info_astring(std::string &str); + + // slider controls + const slider_state *get_slider_list(void); + + // other + void process_natural_keyboard(); + + void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; } + bool show_timecode_counter(); + bool show_timecode_total(); // word wrap - int wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, std::vector<int> &xstart, std::vector<int> &xend, float text_size = 1.0f); + int wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, std::vector<int> &xstart, std::vector<int> &xend, float text_size = 1.0f); - // draw an outlined box with given line color and filled with a texture - void draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture = nullptr, UINT32 flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + // draw an outlined box with given line color and filled with a texture + void draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture = nullptr, UINT32 flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); - // return text string width with given text size - float get_string_width_ex(const char *s, float text_size); + // return text string width with given text size + float get_string_width_ex(const char *s, float text_size); private: - // instance variables - running_machine & m_machine; - render_font * m_font; - ui_callback m_handler_callback; - UINT32 m_handler_param; - bool m_single_step; - bool m_showfps; - osd_ticks_t m_showfps_end; - bool m_show_profiler; - osd_ticks_t m_popup_text_end; - bool m_use_natural_keyboard; + // instance variables + running_machine & m_machine; + render_font * m_font; + ui_callback m_handler_callback; + UINT32 m_handler_param; + bool m_single_step; + bool m_showfps; + osd_ticks_t m_showfps_end; + bool m_show_profiler; + osd_ticks_t m_popup_text_end; + bool m_use_natural_keyboard; std::unique_ptr<UINT8[]> m_non_char_keys_down; - render_texture * m_mouse_arrow_texture; - bool m_mouse_show; - bool m_show_timecode_counter; + render_texture * m_mouse_arrow_texture; + bool m_mouse_show; + bool m_show_timecode_counter; bool m_show_timecode_total; bool m_load_save_hold; ui_options m_ui_options; - // text generators - std::string &disclaimer_string(std::string &buffer); - std::string &warnings_string(std::string &buffer); + // text generators + std::string &disclaimer_string(std::string &buffer); + std::string &warnings_string(std::string &buffer); - // UI handlers - static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state); + // UI handlers + static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state); - // private methods - void exit(); + // private methods + void exit(); }; diff --git a/src/emu/ui/utils.cpp b/src/emu/ui/utils.cpp index 7ac94d5e050..333ee95971a 100644 --- a/src/emu/ui/utils.cpp +++ b/src/emu/ui/utils.cpp @@ -25,7 +25,7 @@ std::vector<std::string> c_mnfct::ui; // Main filters UINT16 main_filters::actual = 0; -const char *main_filters::text[] = { "All", "Available", "Unavailable", "Working", "Not Working", "Mechanical", "Not Mechanical", +const char *main_filters::text[] = { "All", "Available", "Unavailable", "Working", "Not Working", "Mechanical", "Not Mechanical", "Category", "Favorites", "BIOS", "Originals", "Clones", "Manufacturers", "Years", "Support Save", "Not Support Save", "CHD", "No CHD", "Vertical", "Horizontal", "Custom" }; size_t main_filters::length = ARRAY_LENGTH(main_filters::text); diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp index c55038d3065..053389c95e1 100644 --- a/src/emu/uiinput.cpp +++ b/src/emu/uiinput.cpp @@ -326,8 +326,8 @@ void ui_input_manager::push_char_event(render_target* target, unicode_char ch) } /*------------------------------------------------- - push_mouse_wheel_event - pushes a mouse - wheel event to the specified render_target + push_mouse_wheel_event - pushes a mouse + wheel event to the specified render_target -------------------------------------------------*/ void ui_input_manager::push_mouse_wheel_event(render_target *target, INT32 x, INT32 y, short delta, int ucNumLines) @@ -350,4 +350,4 @@ void ui_input_manager::mark_all_as_pressed() { for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++) m_next_repeat[code] = osd_ticks(); -}
\ No newline at end of file +} diff --git a/src/emu/video.h b/src/emu/video.h index 7a1808ad095..67939d47eaa 100644 --- a/src/emu/video.h +++ b/src/emu/video.h @@ -94,7 +94,7 @@ public: void begin_recording(const char *name, movie_format format); void end_recording(movie_format format); void add_sound_to_recording(const INT16 *sound, int numsamples); - + void set_timecode_enabled(bool value) { m_timecode_enabled = value; } bool get_timecode_enabled() { return m_timecode_enabled; } bool get_timecode_write() { return m_timecode_write; } @@ -104,7 +104,7 @@ public: void add_to_total_time(attotime time) { m_timecode_total += time; } std::string &timecode_text(std::string &str); std::string &timecode_total_text(std::string &str); - + private: // internal helpers @@ -196,13 +196,13 @@ private: static const attoseconds_t ATTOSECONDS_PER_SPEED_UPDATE = ATTOSECONDS_PER_SECOND / 4; static const int PAUSED_REFRESH_RATE = 30; - - bool m_timecode_enabled; // inp.timecode record enabled - bool m_timecode_write; // Show/hide timer at right (partial time) - std::string m_timecode_text; // Message for that video part (intro, gameplay, extra) - attotime m_timecode_start; // Starting timer for that video part (intro, gameplay, extra) - attotime m_timecode_total; // Show/hide timer at left (total elapsed on resulting video preview) - + + bool m_timecode_enabled; // inp.timecode record enabled + bool m_timecode_write; // Show/hide timer at right (partial time) + std::string m_timecode_text; // Message for that video part (intro, gameplay, extra) + attotime m_timecode_start; // Starting timer for that video part (intro, gameplay, extra) + attotime m_timecode_total; // Show/hide timer at left (total elapsed on resulting video preview) + }; #endif /* __VIDEO_H__ */ |