Previous 15994 Revisions Next

r5863 Wednesday 23rd September, 2009 at 14:46:55 UTC by Miodrag Milanović
Floppy - Fixed IMAGE_CREATABLE flag
[src/mess/devices]flopdrv.c

src/mess/devices/flopdrv.c
r5862r5863
863863      case DEVINFO_INT_IMAGE_TYPE:            info->i = IO_FLOPPY; break;
864864      case DEVINFO_INT_IMAGE_READABLE:         info->i = 1; break;
865865      case DEVINFO_INT_IMAGE_WRITEABLE:         info->i = 1; break;
866      case DEVINFO_INT_IMAGE_CREATABLE:         info->i = ((floppy_config*)device->static_config)->formats->param_guidelines ? 1 : 0; break; // Fix this
867
866      case DEVINFO_INT_IMAGE_CREATABLE:   {     
867                                    int cnt = 0;
868                                    if ( device && device->static_config )
869                                    {
870                                       const struct FloppyFormat *floppy_options = ((floppy_config*)device->static_config)->formats;
871                                       int   i;
872                                       for ( i = 0; floppy_options[i].construct; i++ ) {
873                                          if(floppy_options[i].param_guidelines) cnt++;
874                                       }                                       
875                                    }
876                                    info->i = (cnt>0) ? 1 : 0;
877                                 }
878                                 break;
868879      /* --- the following bits of info are returned as pointers to data or functions --- */
869880      case DEVINFO_FCT_START:                  info->start = DEVICE_START_NAME(floppy); break;
870881      case DEVINFO_FCT_IMAGE_CREATE:            info->f = (genf *) DEVICE_IMAGE_CREATE_NAME(floppy); break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team