Commit Graph

47 Commits

Author SHA1 Message Date
Nathan Woods
bf111bbc6e Converted a number of zippath calls that took 'const char *' to std::string 2016-07-29 18:00:46 -04:00
Nathan Woods
b12da9c090 Miscellaneous cleanups to diimage.[cpp|h]; mostly std::string stuff 2016-07-29 08:29:47 -04:00
Miodrag Milanovic
4887ce1844 Cleanups and version bump 2016-07-27 09:26:22 +02:00
AJR
d7df2df4a7 Cleanups for device_image_interface (nw)
- Remove the loaded_through_softlist virtual method and add a boolean getter with the same name, replacing a few variables that provided similar but redundant flags.
- Remove call_softlist_load, which the previous change reduces to a simple, unnecessary wrapper.
2016-07-23 21:56:44 -04:00
Nathan Woods
4aa0ab1724 Moved src/emu/hash.[cpp|h] into src/lib/util, and namespaced that code (and hashing.[cpp|h]) into util:: 2016-07-23 12:49:33 -04:00
Nathan Woods
e45d316bc9 Vas Crabb feedback: Replacing the enum with a class hierarchy, derived from 'software_list_loader' 2016-07-23 09:10:14 -04:00
Nathan Woods
ae5dab64d7 device_image_interface::call_softlist_load() was a virtual function where every implementation was one of two copy-and-paste jobs. This change consolidates all of these implementations, replacing that virtual function with a mere hook that chooses which technique to perform 2016-07-21 21:10:18 -04:00
Nathan Woods
c86ab9dbac Exposed several strings as std::string on softlist objects, and fixed a few bugs 2016-07-20 09:44:27 -04:00
Nathan Woods
12369fe758 const correctness related changes to softlist 2016-07-19 20:40:45 -04:00
Vas Crabb
aaa3090dd3 clean up includes (nw) 2016-07-08 14:04:20 +10:00
Vas Crabb
1c0947a717 Merge pull request #1056 from npwoods/opresolv_cplusplusification
C++-ification of src/lib/util/opresolv.[cpp|h]
2016-07-08 12:37:58 +10:00
Nathan Woods
80a7239950 Changed image_device_format::extensions() to be a vector 2016-07-07 19:23:03 -04:00
Nathan Woods
e3cb2c7d78 C++-ification of src/lib/util/opresolv.[cpp|h] (moved to util:: namespace, changed option_resolution to be a class, etc) 2016-07-07 06:59:35 -04:00
Nathan Woods
4079da505e Changed diimage.cpp to use C++ comments 2016-07-05 21:47:30 -04:00
Nathan Woods
a620ba26cd Converted properties on image_device_format to return 'const std::string &' instead of 'const char *' 2016-07-05 21:36:04 -04:00
Nathan Woods
bdf2059bf4 As per Vas Crabb, readding overloads that take a std::string& parameter for the result 2016-07-04 23:22:37 -04:00
Nathan Woods
de6bbdf176 Changed a few zippath related functions to return their strings as a return value, as opposed to passing in a destination buffer 2016-07-03 13:28:09 -04:00
Vas Crabb
5cee9e9bc4 POSIX implementation for new directory read features, cleanup of Windows implementation, return directory handle as smart pointer, fix full build [Vas Crabb] 2016-06-25 03:35:23 +10:00
Nathan Woods
cd8b414e6b C++-ified osd_directory (now osd::directory), and added last_modified to osd::directory::entry 2016-06-24 07:13:18 -04:00
Miodrag Milanovic
286a7e06b9 m_formatlist is now vector (nw) 2016-06-19 10:10:11 +02:00
AJR
32fbe35386 Check software parts for incompatibility as well as compatibility
This new softlist feature is now used by genesis_tmss to exclude several entries from megadriv.xml.

- Use popmessage instead of osd_printf_warning for incompatibility warnings
- Unify some common software loading code, which reduces indentation levels in clifront.cpp
2016-05-03 23:52:32 -04:00
Miodrag Milanovic
cfee536f22 Cleanups and version bump 2016-04-27 08:13:59 +02:00
Miodrag Milanovic
89c5e1f681 Various cleanups suggested by static analyzer (nw) 2016-04-24 12:58:31 +02:00
Miodrag Milanovic
1c726824f2 Split UI and frontend part from core [Miodrag Milanovic] 2016-04-23 11:26:47 +02:00
AJR
084d3654ca Iterate over devices C++11 style
Replace the old device_iterator and its specialized versions with functionally equivalent classes that use standard operators to yield references to devices/interfaces rather than pointers. With range-based for loops, they no longer have to be stored in named variables, though they can also be reused concurrently since the iteration state is now maintained by a subclass.

Add a few more typical getters to device_t::subdevice_list.
2016-04-18 18:53:28 -04:00
etabeta78
c1600cafd9 diimage.cpp: Allow image devices to be configured with a fixed
(not user selectable) piece of software and updated a few options
and menu to acknowledge such possibility. [Fabio Priuli]

macs.cpp: Converted to use generic cartslot with fixed software
configuration. Cleaned up loading and banking systems in the driver
as a result. [Fabio Priuli]
2016-04-12 14:37:22 +02:00
dankan1890
5fe4b275dc Fixed MT06173: Software loaded outside of software list (e.g. -cart PATH_TO_ROM) fails to save SRAM. 2016-04-04 00:39:03 +02:00
AJR
a7e393b36b Iterate over core classes C++11 style
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).
2016-03-31 09:43:53 -04:00
Vas Crabb
100fa28671 * Remove confusing method from vectorstreams that hide base_ios method (fixes disassembly view)
* Allow std::string to pass through core_file unmolested (reduces temporary allocations)
* Make zip/7z instances of same class with uniform interface
* zippath browsing is broken at the moment

This is another step towards transparent archive support.  It's now
possible to access zip and 7z archives with the same code.  Nothing is
taking advantage of it yet.  There's now some very similar code in
fileio.cpp and clifront.cpp that could be folded at some point.
2016-03-18 19:32:10 +11:00
Vas Crabb
42fbb9c396 Make osd_file a polymorphic class that's held with smart pointers
Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures
Make zip_file and _7z_file classes rather than having free functions everywhere
Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache
Don't dump as much crap in global namespace
Add solaris PTY implementation
Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax
Rearrange stuff so the same things are in file module for all OSDs
Move file stuff into its own module

7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access
Directory functions still need to be moved to file module
SDL OSD may not initialise WinSock on Windows
2016-03-14 18:55:00 +11:00
Vas Crabb
73b44c9429 Turn core_file into a proper class that gets cleaned up safely using unique_ptr
Subverted somewhat by chd_file class
2016-03-06 21:49:56 +11:00
Vas Crabb
aec01e7407 Replace strformat, strprintf and strcatprintf with type-safe steam_format 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
2016-02-28 13:36:19 +11:00
dankan1890
16d9f27d06 Some missed in menu conversion. 2016-01-31 00:00:43 +01:00
dankan1890
361d32d37f Small code cleanup:
- corealloc.h: added macro definition for global_alloc (nothrow) memory allocation.
- textbuf.cpp / wavwrite.cpp: removed pointless cast.
- debugcmd.cpp / luaengine.cpp / render.cpp: avoid strlen calls in a loop.
- diimage.cpp: simplified "device_image_interface::set_image_filename" function.
- miscmenu.cpp / selgame.h / video.cpp(h): replaced int with bool where applicable.
- ui.cpp: removed unused code.
2016-01-29 00:43:18 +01:00
Miodrag Milanovic
b1d6f6d63f Cleanups and version bump 2016-01-27 08:12:00 +01:00
therealmogminer@gmail.com
2820f1c277 Time for more this==NULL fixes 2016-01-23 17:30:14 +01:00
mooglyguy
821c7e0b2b Still more this==NULL cleanup 2016-01-23 17:30:14 +01:00
Miodrag Milanovic
4e8e3066f8 reverting:
SHA-1: 1f90ceab07

* tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
2016-01-20 21:42:13 +01:00
Miodrag Milanovic
1f90ceab07 tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
2016-01-16 14:54:42 +01:00
Miodrag Milanovic
43cc0ac675 final touch on romload modernization (nw) 2016-01-11 21:27:11 +01:00
Miodrag Milanovic
f0dc809ab8 image_manager modernized and move some things around (nw) 2016-01-11 14:59:24 +01:00
AJR
115db95642 Return std::string objects by value rather than pass by reference
- 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
2016-01-10 16:36:18 -05:00
Miodrag Milanovic
ce75a5d682 removed memory tracking (nw) 2016-01-08 12:41:13 +01:00
Miodrag Milanovic
91605d3f4d clang-modernize part 1 (nw) 2015-12-03 18:17:25 +01:00
Miodrag Milanovic
0825ce4f3b Cleanups and version bump 2015-11-25 08:22:24 +01:00
Miodrag Milanovic
d1dc775f9b Some cleanups and init fixes with help of ReSharper C++ (nw) 2015-11-11 16:31:18 +01:00
Miodrag Milanovic
7c19aac60e Rename *.c -> *.cpp in our source (nw) 2015-11-08 12:56:12 +01:00