summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/options.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "fixed some modernize-use-equals-default clang-tidy warnings (… (#6360) Oliver Stöneberg2020-04-081-0/+9
| | | | | | | * 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-0/+27
|
* fixed some modernize-use-equals-default clang-tidy warnings (nw) (#6237) Oliver Stöneberg2020-01-301-36/+0
|
* fixed some clang-tidy warnings (nw) (#6236) Oliver Stöneberg2020-01-301-1/+1
| | | | | | | | | | | | | | | | * fixed some modernize-redundant-void-arg clang-tidy warnings (nw) * fixed some modernize-use-bool-literals clang-tidy warnings (nw) * fixed some modernize-use-emplace clang-tidy warnings (nw) * fixed some performance-move-const-arg clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
* Merge pull request #6195 from firewave/includes R. Belmont2020-01-221-4/+4
|\ | | | | use C++ library includes (nw)
| * use C++ library includes (nw) firewave2020-01-221-4/+4
| |
* | fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-221-1/+1
|/ | | | | | | | | | | | | | * fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
* util/options.cpp: fix locale issues and a const correctness issue Vas Crabb2019-11-231-62/+141
|
* lib/util/options.cpp: Don't try to set the value of a header (nw) AJR2018-10-041-1/+2
|
* -options: Restored erroneously-removed game-specific INI option reversion ↵ mooglyguy2018-10-051-0/+26
| | | | between runs. Fixes MT#06171. [Ryan Holtz]
* Fix error in debug build with SMS card options (nw) AJR2018-05-211-1/+1
|
* options: Set the value when setting the default as before [O. Galibert] Olivier Galibert2017-06-251-1/+1
|
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-448/+532
|
* Bug fix to -romident and aux verb cleanup (take two) (#2299) npwoods2017-05-131-22/+52
| | | | | | | | | | * 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-31/+11
| | | | This reverts commit 78bf804192f38d69fc9299dc7da724fb6a537f94.
* Bug fix to -romident and aux verb cleanup (#2288) npwoods2017-05-121-11/+31
| | | | | | | | | | | | | | | | | | | | * 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-2/+2
| | | | be 'bool ignore_unknown_options'
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-535/+433
| | | | | | | | | | | | 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-433/+535
| | | | | | | | | | | | 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-21/+0
|
* More options refactoring Nathan Woods2017-04-161-3/+15
| | | | | | | | 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-1/+8
| | | | | | | 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.
* Fixed issue that could cause bogus arguments to be reported incorrectly Nathan Woods2017-04-021-3/+8
| | | | Examples: 'mame -whatever nes' would previously be reported as "Unrecognized argument: nes"
* srcclean (nw) Vas Crabb2017-03-261-2/+2
|
* Fixed regression pertaining to specification of empty strings as slot names Nathan Woods2017-02-271-4/+5
| | | | e.g. - 'next -scsibus:1 "" -listdevices'
* Fixed an issue where device options (e.g. -cart) were reported as unknown ↵ Vas Crabb2017-02-241-2/+2
|\ | | | | | | | | | | | | when they actually worked (#2081) Conflicts: src/frontend/mame/clifront.cpp
* | Vas feedback Nathan Woods2017-02-231-8/+3
| |
* | Fixed an issue where device options (e.g. -cart) were reported as unknown ↵ Nathan Woods2017-02-221-22/+51
|/ | | | | | | | 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/+40
| | | | | | | | | | * 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
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-7/+7
| | | | | 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
* fixed clang (nw) Miodrag Milanovic2016-07-311-0/+1
|
* Cleanups and version bumpmame0173 Miodrag Milanovic2016-04-271-1/+1
|
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-1/+1
|
* Revert software-installed slot/image options when changing software AJR2016-04-041-6/+6
| | | | | - 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.
* fix: inline not allowed. (nw) dankan18902016-04-031-1/+1
|
* Small changes. (nw) dankan18902016-04-031-0/+6
|
* Iterate over core classes C++11 style AJR2016-03-311-19/+19
| | | | | | | | 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-2/+2
| | | | Subverted somewhat by chd_file class
* * Support *n conversion in stream_format/string_format Vas Crabb2016-03-011-5/+5
| | | | | | | | | * Make stream_format return characters printed * Add iostreams with std::vector storage * Move to type-safe templates for logerror and popmessage * Remove now-unnecessary I64FMT from calls to logerror/popmessage * Put some lib/util stuff in util:: namespace * Some fixes to Japanese translation
* Replace strformat, strprintf and strcatprintf with type-safe steam_format ↵ Vas Crabb2016-02-281-63/+61
| | | | | | | | | and string_format Update MAME to use new function Instantiate ODR-used static constant members Make some of the UI code more localisable Remove use of retired functions in tools
* MAME related settings are saved on request only (nw) Miodrag Milanovic2016-02-061-1/+22
|
* Return std::string objects by value rather than pass by reference AJR2016-01-101-10/+8
| | | | | | - 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
* Fix after tagmap conversion (nw) Miodrag Milanovic2015-12-101-1/+4
|
* tagmap_t to std::unordered_map or std::unordered_set where applicable (nw) Miodrag Milanovic2015-12-091-38/+37
|
* clang-modernize part 5 Miodrag Milanovic2015-12-041-1/+1
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-31/+31
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+819