trunk/src/emu/machine.cpp
| r250275 | r250276 | |
| 309 | 309 | |
| 310 | 310 | |
| 311 | 311 | //------------------------------------------------- |
| 312 | | // add_dynamic_device - dynamically add a device |
| 313 | | //------------------------------------------------- |
| 314 | | |
| 315 | | device_t &running_machine::add_dynamic_device(device_t &owner, device_type type, const char *tag, UINT32 clock) |
| 316 | | { |
| 317 | | // add the device in a standard manner |
| 318 | | device_t *device = const_cast<machine_config &>(m_config).device_add(&owner, tag, type, clock); |
| 319 | | |
| 320 | | // notify this device and all its subdevices that they are now configured |
| 321 | | device_iterator iter(root_device()); |
| 322 | | for (device_t *dev = iter.first(); dev != NULL; dev = iter.next()) |
| 323 | | if (!dev->configured()) |
| 324 | | dev->config_complete(); |
| 325 | | return *device; |
| 326 | | } |
| 327 | | |
| 328 | | |
| 329 | | //------------------------------------------------- |
| 330 | 312 | // run - execute the machine |
| 331 | 313 | //------------------------------------------------- |
| 332 | 314 | |