summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/options.h
Commit message (Collapse)AuthorAgeFilesLines
* imagedev/floppy.cpp: Delete unused getter that leaked details AJR2024-02-111-1/+1
| | | | * util/options.h: Use forwarding header
* osd/modules/file: Don't magically substitute environment variables when ↵ npwoods2022-12-171-6/+17
| | | | | | | | opening files. (#9859) * util/options.cpp: Added option types for single and multiple paths. * util/options.cpp: Substitute environment variables in values from defaults and INI files. * ui/dirmenu.cpp: Removed hard-coded list of multi-path options. * plugins: Don't substitute environment variables in path options.
* util/options.h: Removed legacy OPTION_* option type constants. (#9851) npwoods2022-05-301-10/+0
| | | These constants were polluting the global namespace.
* Much more core std::string_view modernization AJR2021-01-201-21/+28
| | | | | | | | | | | | | | | - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages
* options.h: Be more honest about #including prerequisites AJR2021-01-021-0/+7
|
* Revert "fixed some modernize-use-equals-default clang-tidy warnings (… (#6360) Oliver Stöneberg2020-04-081-2/+2
| | | | | | | * Revert "fixed some modernize-use-equals-default clang-tidy warnings (nw)" This reverts commit 54486ab9 * fixed merge error
* there are reasons for things being the way they were (nw) Vas Crabb2020-01-311-3/+3
|
* fixed some modernize-use-equals-default clang-tidy warnings (nw) (#6237) Oliver Stöneberg2020-01-301-4/+4
|
* util/options.cpp: fix locale issues and a const correctness issue Vas Crabb2019-11-231-27/+28
|
* Use canonical spelling of "canonical" (nw) AJR2019-08-021-1/+1
|
* Enabled default move ctor/assignments in core_options, and changed npwoods2019-08-011-2/+2
| | | | plugin_options code to use them
* -options: Restored erroneously-removed game-specific INI option reversion ↵ mooglyguy2018-10-051-0/+3
| | | | between runs. Fixes MT#06171. [Ryan Holtz]
* more srcclean (nw) Vas Crabb2017-06-251-1/+1
|
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-117/+181
|
* srcclean (nw) Vas Crabb2017-05-281-1/+1
|
* Bug fix to -romident and aux verb cleanup (take two) (#2299) npwoods2017-05-131-0/+2
| | | | | | | | | | * Resurrected auxverb_cleanup_and_romident_bugfix * Changed usage for -romident and minor cleanups * Supporting auxverbs in any order The previous patch was supporting 'mame64 -listsource pacman' but not 'mame64 pacman -listsource'
* Revert "Bug fix to -romident and aux verb cleanup (#2288)" Vas Crabb2017-05-121-2/+0
| | | | This reverts commit 78bf804192f38d69fc9299dc7da724fb6a537f94.
* Bug fix to -romident and aux verb cleanup (#2288) npwoods2017-05-121-0/+2
| | | | | | | | | | | | | | | | | | | | * Bug fix to -romident and aux verb cleanup Made the following changes: 1. Fixed a bug where resolved slot/image options would choke -romident (reproducible in MAME 0.185 with 'mame64 -romident coco.zip') 2. 'mame64 -romident' no longer crashes (though it doesn't do anything useful) 3. Changed the aux verb functions to take 'const std::string &' * Further cleanups to auxillary verb code, as per Vas Specifically: 1. The commands themselves now take 'const std::vector<std::string> &' for their argument lists 2. util::core_options now collects command arguments into a separate vector rather than treating them as unadorned arguments * Vas Crabb feedback * Now only using trim_spaces_and_quotes() when parsing INIs Vas pointed out that it is inappropriate to trim spaces and quotes when parsing command line options
* Changed 'int ignore_warnings' parameter on core_options::parse_ini_file() to ↵ Nathan Woods2017-05-101-1/+1
| | | | be 'bool ignore_unknown_options'
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-177/+117
| | | | | | | | | | | | This reverts commit 536990e77b49ccc50ef275bfbf1018cc29c16154. Conflicts: src/frontend/mame/mame.cpp Sorry, but this change was half-baked. It breaks a lot of existing functionality and clearly hasn't been tested in more than a tiny subset of use cases. Please play this work back onto your own branch, and test it before submitting another PR.
* Overhaul to how MAME handles options (#2260) npwoods2017-05-051-117/+177
| | | | | | | | | | | | 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.
* Pruned out some cruft in src/lib/util/options.[cpp|h] Nathan Woods2017-04-171-8/+4
|
* More options refactoring Nathan Woods2017-04-161-1/+10
| | | | | | | | This should address outstanding concerns with PR#2231. I'm trying to turn emu_options into a self contained structure that encapsulates behaviors related to options, including the gymnastics pertaining to image/slot loading and interactions with get_default_card_software() and "just works". When the MAME 0.186 development cycle starts up, I hope to take this further. I want to make core_options::entry an abstract base class so that the entries associated with image options and slot options can derive from it. This will eliminate the current need for emu_options to directly expose maps for image and slot options. For now, I'm in stabilization mode, and I hope to get things working for a stable 0.185 release.
* Fixes issues specifying image/slot options fron INI files (reported by ↵ npwoods2017-04-151-0/+2
| | | | | | | Robbbert) (#2231) This fix really doesn't go far enough. I added hooks so that options specified at the command line can also be responded to when parsed from INI files, but in the long run much of the logic that is currently in mame_options should go into emu_options so that when an option is specified, all of the wacko logic around slot/image specification "just works" because it is encapsulated within emu_options. We have a release 11 days away; I want to be in stabilization mode.
* fix crash on excessive command-line options, clean up some tabulation, ↵ Vas Crabb2017-03-031-1/+1
| | | | remove long-dead option
* Fixed regression pertaining to specification of empty strings as slot names Nathan Woods2017-02-271-1/+1
| | | | e.g. - 'next -scsibus:1 "" -listdevices'
* Fixed an issue where device options (e.g. -cart) were reported as unknown ↵ Nathan Woods2017-02-221-3/+3
| | | | | | | | when they actually worked This change also changes around how command line arguments are passed around; specifically I changed argc/argv to be std::vector<std::string> Note this is not passed around 'const', the reason being that the command line processing will now "eat" the vector
* Softlist cleanup (#2075) npwoods2017-02-221-0/+4
| | | | | | | | | | * Eliminates the need for emu_options::update_cached_options() by providing a hook for when option values change * This is a preliminary fix to the issue identified in PR#2065 * More softlist related refactoring: - We now only parse the command line (with core_options::parse_command_line()) once - Options that are set up during slot and image setup go through a 'value_specifier' function - Eliminated the command line postprocessing
* Reverting part of changes from previous commits as described in mail on list ↵ Miodrag Milanovic2016-10-231-1/+1
| | | | (nw)
* there you go (nw) Miodrag Milanovic2016-10-221-1/+1
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-12/+12
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* some bool <-> int not needed conversions, also cleaned drivenum.* was using ↵ Miodrag Milanovic2016-10-211-1/+1
| | | | memset for clearing vector (nw)
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-1/+1
| | | | to inline functions (nw)
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-1/+0
|
* Revert software-installed slot/image options when changing software AJR2016-04-041-2/+2
| | | | | - Remove emu.h's stealth include of emuopts.h through mconfig.h; reduce dependency on emuopts.h in other headers and source files. - MCFG_CPU_FORCE_NO_DRC is now a CPU configuration parameter rather than a global one; it still works to override the -drc option setting.
* Small changes. (nw) dankan18902016-04-031-1/+1
|
* refactor miscmenu and add adv menu (nw) Jeffrey Clark2016-04-031-0/+1
|
* Avoid auto return types; silence some unused variable warnings (nw) AJR2016-03-311-2/+3
|
* Iterate over core classes C++11 style AJR2016-03-311-0/+4
| | | | | | | | C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.) device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config. memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
* Turn core_file into a proper class that gets cleaned up safely using unique_ptr Vas Crabb2016-03-061-1/+1
| | | | Subverted somewhat by chd_file class
* Cleanups and version bump Miodrag Milanovic2016-02-241-1/+1
|
* MAME related settings are saved on request only (nw) Miodrag Milanovic2016-02-061-0/+5
|
* Return std::string objects by value rather than pass by reference AJR2016-01-101-2/+2
| | | | | | - strprintf is unaltered, but strformat now takes one fewer argument - state_string_export still fills a buffer, but has been made const - get_default_card_software now takes no arguments but returns a string
* tagmap_t to std::unordered_map or std::unordered_set where applicable (nw) Miodrag Milanovic2015-12-091-2/+2
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-4/+4
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-14/+14
|
* removed bool conversion and implicit empty check (nw) Miodrag Milanovic2015-04-191-2/+2
|
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-5/+5
|
* cstr() - > c_str() as preparation for move to std::string (nw) Miodrag Milanovic2015-04-111-1/+1
|
* Changed osd_font to struct osd_font and removed unnecessary osdepend.h couriersud2015-01-171-1/+0
| | | includes.