diff options
| author | 2017-05-05 02:17:49 -0400 | |
|---|---|---|
| committer | 2017-05-05 16:17:49 +1000 | |
| commit | 536990e77b49ccc50ef275bfbf1018cc29c16154 (patch) | |
| tree | 86e160cca07995479cd87506732c178b3728e58a /src/emu/natkeyboard.cpp | |
| parent | cce3369cdeec54494c6d4dc4a781cbba64d027bd (diff) | |
Overhaul to how MAME handles options (#2260)
This is an overhaul to how MAME handles options to provide a better foundation for what MAME is already doing in practice. Previously, core_options was designed to provide an input/output facility for reading options from the command line and INI files. However, the current needs (image/slot/get_default_card_software calculus and MewUI) go way beyond that.
Broadly, this PR makes the following changes:
* core_options now has an extensibility mechanism, so one can register options that behave dramatically differently
* With that foundation, emu_options now encapsulates all of the funky image/slot/get_default_card_software calculus that were previously handled by static methods in mameopts.cpp. Changes to emu_options should not automatically cascade in such a way so that it stays in a consistent state
* emu_options no longer provides direct access to the slot_options/image_options maps; there are simpler API functions that control these capabilities
* Many core_options functions that expose internal data structures (e.g. - priority) that were only really needed because of previous (now obsolete) techniques have been removed.
* core_options is now exception based (rather than dumping text to an std::string). The burden is on the caller to catch these, and discern between warnings and errors as needed.
Obviously this is a risky change; that's why this is being submitted at the start of the dev cycle.
Diffstat (limited to 'src/emu/natkeyboard.cpp')
| -rw-r--r-- | src/emu/natkeyboard.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp index e1921b7a21d..1aa8a78ed75 100644 --- a/src/emu/natkeyboard.cpp +++ b/src/emu/natkeyboard.cpp @@ -365,9 +365,7 @@ void natural_keyboard::set_in_use(bool usage) { // update active usage m_in_use = usage; - std::string error; - machine().options().set_value(OPTION_NATURAL_KEYBOARD, usage, OPTION_PRIORITY_CMDLINE, error); - assert(error.empty()); + machine().options().set_value(OPTION_NATURAL_KEYBOARD, usage, OPTION_PRIORITY_CMDLINE); // lock out (or unlock) all keyboard inputs for (auto &port : machine().ioport().ports()) |
