ui: allow to skip warning popup at start

This commit is contained in:
hap 2020-07-10 00:43:33 +02:00
parent 4ee2f625bb
commit 74f456df94
4 changed files with 72 additions and 67 deletions

View File

@ -195,6 +195,7 @@ 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 system information screen at startup" },
{ OPTION_SKIP_WARNINGS, "0", OPTION_BOOLEAN, "skip displaying emulation warnings 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_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" },

View File

@ -164,6 +164,7 @@
#define OPTION_BIOS "bios"
#define OPTION_CHEAT "cheat"
#define OPTION_SKIP_GAMEINFO "skip_gameinfo"
#define OPTION_SKIP_WARNINGS "skip_warnings"
#define OPTION_UI_FONT "uifont"
#define OPTION_UI "ui"
#define OPTION_RAMSIZE "ramsize"
@ -441,6 +442,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); }
bool skip_warnings() const { return bool_value(OPTION_SKIP_WARNINGS); }
const char *ui_font() const { return value(OPTION_UI_FONT); }
ui_option ui() const { return m_ui; }
const char *ram_size() const { return value(OPTION_RAMSIZE); }

View File

@ -26,6 +26,7 @@ std::vector<submenu::option> const submenu::misc_options = {
{ submenu::option_type::EMU, __("Show mouse pointer"), OPTION_UI_MOUSE },
{ submenu::option_type::EMU, __("Confirm quit from machines"), OPTION_CONFIRM_QUIT },
{ submenu::option_type::EMU, __("Skip information screen at startup"), OPTION_SKIP_GAMEINFO },
{ submenu::option_type::EMU, __("Skip emulation warnings screen at startup"), OPTION_SKIP_WARNINGS },
{ submenu::option_type::UI, __("Force 4:3 aspect for snapshot display"), OPTION_FORCED4X3 },
{ submenu::option_type::UI, __("Use image as background"), OPTION_USE_BACKGROUND },
{ submenu::option_type::UI, __("Skip BIOS selection menu"), OPTION_SKIP_BIOS_MENU },

View File

@ -305,7 +305,8 @@ void mame_ui_manager::display_startup_screens(bool first_time)
const int maxstate = 3;
int str = machine().options().seconds_to_run();
bool show_gameinfo = !machine().options().skip_gameinfo();
bool show_warnings = true, show_mandatory_fileman = true;
bool show_warnings = !machine().options().skip_warnings();
bool show_mandatory_fileman = true;
bool video_none = strcmp(downcast<osd_options &>(machine().options()).video(), OSDOPTVAL_NONE) == 0;
// disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,