mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Add option to disable saving NVRAM on exit
This commit is contained in:
parent
a8ba61af02
commit
a72b3e4ae6
@ -51,7 +51,7 @@ const options_entry emu_options::s_option_entries[] =
|
||||
// output directory options
|
||||
{ nullptr, nullptr, OPTION_HEADER, "CORE OUTPUT DIRECTORY OPTIONS" },
|
||||
{ OPTION_CFG_DIRECTORY, "cfg", OPTION_STRING, "directory to save configurations" },
|
||||
{ OPTION_NVRAM_DIRECTORY, "nvram", OPTION_STRING, "directory to save nvram contents" },
|
||||
{ OPTION_NVRAM_DIRECTORY, "nvram", OPTION_STRING, "directory to save NVRAM contents" },
|
||||
{ OPTION_INPUT_DIRECTORY, "inp", OPTION_STRING, "directory to save input device logs" },
|
||||
{ OPTION_STATE_DIRECTORY, "sta", OPTION_STRING, "directory to save states" },
|
||||
{ OPTION_SNAPSHOT_DIRECTORY, "snap", OPTION_STRING, "directory to save/load screenshots" },
|
||||
@ -200,6 +200,10 @@ const options_entry emu_options::s_option_entries[] =
|
||||
{ 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" },
|
||||
{ OPTION_LANGUAGE ";lang", "English", OPTION_STRING, "display language" },
|
||||
{ OPTION_NVRAM_SAVE ";nvwrite", "1", OPTION_BOOLEAN, "save NVRAM on exit" },
|
||||
|
||||
{ nullptr, nullptr, OPTION_HEADER, "SCRIPTING OPTIONS" },
|
||||
{ OPTION_AUTOBOOT_COMMAND ";ab", nullptr, OPTION_STRING, "command to execute after machine boot" },
|
||||
{ OPTION_AUTOBOOT_DELAY, "0", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" },
|
||||
{ OPTION_AUTOBOOT_SCRIPT ";script", nullptr, OPTION_STRING, "lua script to execute after machine boot" },
|
||||
@ -207,7 +211,6 @@ const options_entry emu_options::s_option_entries[] =
|
||||
{ OPTION_PLUGINS, "1", OPTION_BOOLEAN, "enable LUA plugin support" },
|
||||
{ OPTION_PLUGIN, nullptr, OPTION_STRING, "list of plugins to enable" },
|
||||
{ OPTION_NO_PLUGIN, nullptr, OPTION_STRING, "list of plugins to disable" },
|
||||
{ OPTION_LANGUAGE ";lang", "English", OPTION_STRING, "display language" },
|
||||
|
||||
{ nullptr, nullptr, OPTION_HEADER, "HTTP SERVER OPTIONS" },
|
||||
{ OPTION_HTTP, "0", OPTION_BOOLEAN, "HTTP server enable" },
|
||||
|
@ -168,6 +168,7 @@
|
||||
#define OPTION_UI_FONT "uifont"
|
||||
#define OPTION_UI "ui"
|
||||
#define OPTION_RAMSIZE "ramsize"
|
||||
#define OPTION_NVRAM_SAVE "nvram_save"
|
||||
|
||||
// core comm options
|
||||
#define OPTION_COMM_LOCAL_HOST "comm_localhost"
|
||||
@ -444,6 +445,7 @@ public:
|
||||
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); }
|
||||
bool nvram_save() const { return bool_value(OPTION_NVRAM_SAVE); }
|
||||
|
||||
// core comm options
|
||||
const char *comm_localhost() const { return value(OPTION_COMM_LOCAL_HOST); }
|
||||
|
@ -372,7 +372,8 @@ int running_machine::run(bool quiet)
|
||||
|
||||
// save the NVRAM and configuration
|
||||
sound().ui_mute(true);
|
||||
nvram_save();
|
||||
if (options().nvram_save())
|
||||
nvram_save();
|
||||
m_configuration->save_settings();
|
||||
}
|
||||
catch (emu_fatalerror &fatal)
|
||||
|
Loading…
Reference in New Issue
Block a user