From 733b797a3dae6c89b11c9b3f3eaad68995f6ef09 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 30 Jun 2010 03:46:21 +0000 Subject: Split mame.c into mame.c and machine.c, the latter containing the running_machine definition and implementation. Moved global machine-level operations and accessors into methods on the running_machine class. For the most part, this doesn't affect drivers except for a few occasional bits: mame_get_phase() == machine->phase() add_reset_callback() == machine->add_notifier(MACHINE_NOTIFY_RESET, ...) add_exit_callback() == machine->add_notifier(MACHINE_NOTIFY_EXIT, ...) mame_get_base_datetime() == machine->base_datetime() mame_get_current_datetime() == machine->current_datetime() Cleaned up the region_info class, removing most global region accessors except for memory_region() and memory_region_length(). Again, this doesn't generally affect drivers. --- src/ldplayer/ldplayer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ldplayer') diff --git a/src/ldplayer/ldplayer.c b/src/ldplayer/ldplayer.c index 605544e5866..eebd49f558f 100644 --- a/src/ldplayer/ldplayer.c +++ b/src/ldplayer/ldplayer.c @@ -82,7 +82,7 @@ static void (*execute_command)(running_device *laserdisc, int command); * *************************************/ -static void free_string(running_machine *machine) +static void free_string(running_machine &machine) { } @@ -94,7 +94,7 @@ static chd_file *get_disc(running_device *device) mame_path *path; /* open a path to the ROMs and find the first CHD file */ - path = mame_openpath(mame_options(), OPTION_ROMPATH); + path = mame_openpath(device->machine->options(), OPTION_ROMPATH); if (path != NULL) { const osd_directory_entry *dir; @@ -124,7 +124,7 @@ static chd_file *get_disc(running_device *device) { set_disk_handle(device->machine, "laserdisc", image_file, image_chd); filename.cpy(dir->name); - add_exit_callback(device->machine, free_string); + device->machine->add_notifier(MACHINE_NOTIFY_EXIT, free_string); break; } -- cgit v1.2.3-70-g09d2