From dbf7afe106ce2cbcaa3db8720846e7a76532b66e Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 1 Sep 2010 09:34:55 +0000 Subject: [PATCH] Made options visible to device validate function when doing "-validate", this is used by MESS (example software list and messram devices) (no whatsnew) --- src/emu/clifront.c | 1 + src/emu/mame.c | 11 +++++++++++ src/emu/mame.h | 3 +++ 3 files changed, 15 insertions(+) diff --git a/src/emu/clifront.c b/src/emu/clifront.c index 219aef2547a..4271ea6df17 100644 --- a/src/emu/clifront.c +++ b/src/emu/clifront.c @@ -240,6 +240,7 @@ static int execute_simple_commands(core_options *options, const char *exename) /* validate? */ if (options_get_bool(options, CLIOPTION_VALIDATE)) { + set_mame_options(options); return mame_validitychecks(NULL); } diff --git a/src/emu/mame.c b/src/emu/mame.c index 14fde7a92dc..618ac880086 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -237,6 +237,17 @@ core_options *mame_options(void) +/*------------------------------------------------- + set_mame_options - set mame options, used by + validate option +-------------------------------------------------*/ + +void set_mame_options(core_options *options) +{ + mame_opts = options; +} + + /*************************************************************************** OUTPUT MANAGEMENT ***************************************************************************/ diff --git a/src/emu/mame.h b/src/emu/mame.h index e97362cd6a2..e339c93b1d9 100644 --- a/src/emu/mame.h +++ b/src/emu/mame.h @@ -101,6 +101,9 @@ int mame_execute(core_options *options); /* accesses the core_options for the currently running emulation */ core_options *mame_options(void); +/* set mame options, used by validate option */ +void set_mame_options(core_options *options); + /* return true if the given machine is valid */ int mame_is_valid_machine(running_machine *machine);