device_t *apple525_get_device_by_type(device_t *device, int ftype, int drive) { int i; int cnt = 0; for (i=0;i<4;i++) { device_t *disk = apple525_get_subdevice(device, i); if (floppy_get_drive_type(disk)==ftype) { if (cnt==drive) { return disk; } cnt++; } } return NULL; }
device_t *apple525_get_device_by_type(device_t *device, int ftype, int drive) { int i; int cnt = 0; for (i=0;i<4;i++) { legacy_floppy_image_device *disk = apple525_get_subdevice(device, i); if (disk->floppy_get_drive_type()==ftype) { if (cnt==drive) { return disk; } cnt++; } } return nullptr; }