Added running_machine * to the device_config, live while the device

is live, and NULL otherwise, just like the token.
This commit is contained in:
Aaron Giles 2008-03-05 07:54:12 +00:00
parent ee0a5642ab
commit a724936cb3
2 changed files with 6 additions and 0 deletions

View File

@ -446,6 +446,7 @@ void device_list_start(running_machine *machine)
assert(config->start != NULL);
/* call the start function */
config->machine = machine;
config->token = (*config->start)(machine, config->tag, config->static_config, config->inline_config);
assert(config->token != NULL);
@ -477,6 +478,7 @@ static void device_list_stop(running_machine *machine)
/* clear the token to indicate we are finished */
config->token = NULL;
config->machine = NULL;
}
}

View File

@ -161,7 +161,11 @@ struct _device_config
device_reset_func reset; /* quick pointer to reset callback */
const void * static_config; /* static device configuration */
void * inline_config; /* inline device configuration */
/* these two fields are only valid if the device is live */
void * token; /* token if device is live */
running_machine * machine; /* machine if device is live */
char tag[1]; /* tag for this instance */
};