summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/video/voodoo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/video/voodoo.c')
-rw-r--r--src/emu/video/voodoo.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c
index 4d554a68909..1e85d8c7617 100644
--- a/src/emu/video/voodoo.c
+++ b/src/emu/video/voodoo.c
@@ -4910,7 +4910,15 @@ static DEVICE_START( voodoo )
}
/* set the type, and initialize the chip mask */
- v->index = device->machine().devicelist().indexof(device->type(), device->tag());
+ device_iterator iter(device->machine().root_device());
+ v->index = 0;
+ for (device_t *scan = iter.first(); scan != NULL; scan = iter.next())
+ if (scan->type() == device->type())
+ {
+ if (scan == device)
+ break;
+ v->index++;
+ }
v->screen = downcast<screen_device *>(device->machine().device(config->screen));
assert_always(v->screen != NULL, "Unable to find screen attached to voodoo");
v->cpu = device->machine().device(config->cputag);