From 1b54456be5fd090b039b3e9f691ac0464ffdff12 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 12 Feb 2011 03:47:37 +0000 Subject: mame_file is now emu_file and is a class. It is required to pass a core_options object to the constructor, along with a search path. This required pushing either a running_machine or a core_options through some code that wasn't previously ready to handle it. emu_files can be reused over multiple open/close sessions, and a lot of core code cleaned up nicely as things were converted to them. Also created a file_enumerator class for iterating over files in a searchpath. This replaces the old mame_openpath functions. Changed machine->options() to return a reference. Removed public nvram_open() and fixed jchan/kaneko16 to stop directly saving NVRAM. Removed most of the mame_options() calls; this will soon go away entirely, so don't add any more. Added core_options to device_validity_check() so they can be used to validate things. --- src/emu/imagedev/multcart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/emu/imagedev/multcart.c') diff --git a/src/emu/imagedev/multcart.c b/src/emu/imagedev/multcart.c index 1c0eb9f3d41..d788e031217 100644 --- a/src/emu/imagedev/multcart.c +++ b/src/emu/imagedev/multcart.c @@ -258,7 +258,7 @@ static multicart_open_error load_ram_resource(multicart_load_state *state, xml_d if (resource->filename == NULL) return MCERR_OUT_OF_MEMORY; - image_battery_load_by_name(resource->filename, resource->ptr, resource->length, 0x00); + image_battery_load_by_name(*mame_options(), resource->filename, resource->ptr, resource->length, 0x00); } /* else this type is volatile, in which case we just have a memory expansion */ @@ -362,7 +362,7 @@ static multicart_open_error save_ram_resources(multicart_t *cart) { if ((resource->type == MULTICART_RESOURCE_TYPE_RAM) && (resource->filename != NULL)) { - image_battery_save_by_name(resource->filename, resource->ptr, resource->length); + image_battery_save_by_name(*mame_options(), resource->filename, resource->ptr, resource->length); } } return MCERR_NONE; -- cgit v1.2.3-70-g09d2