mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
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:
parent
ee0a5642ab
commit
a724936cb3
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 */
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user