git @ Cat's Eye Technologies linapple / 694e6fe
Error message when disk could not be inserted. Also fix indentation. Chris Pressey 6 years ago
1 changed file(s) with 16 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
506506 int lf = strlen(imagefilename);
507507 if(lf > 3 && imagefilename[lf-1] == 'z' && imagefilename[lf-2] == 'g' && imagefilename[lf-3] == '.')
508508 {// .gz?
509 snprintf(tempdsk, 12, "drive%d.dsk", drive);
510 if (DiskUnGzip((char*)imagefilename, tempdsk)) {
511 writeprotected = 1;
512 createifnecessary = 0;
513 tmp = tempdsk;
514 }
509 snprintf(tempdsk, 12, "drive%d.dsk", drive);
510 if (DiskUnGzip((char*)imagefilename, tempdsk)) {
511 writeprotected = 1;
512 createifnecessary = 0;
513 tmp = tempdsk;
514 }
515515 }
516516 else
517517 if(lf > 4 && imagefilename[lf-1] == 'p' && imagefilename[lf-2] == 'i' && imagefilename[lf-3] == 'z'
518518 && imagefilename[lf-4] == '.') // .zip?
519519 {
520 snprintf(tempdsk, 12, "drive%d.dsk", drive);
521 if (DiskUnZip((char*)imagefilename, tempdsk)) {
522 writeprotected = 1;
523 createifnecessary = 0;
524 tmp = tempdsk;
525 }
520 snprintf(tempdsk, 12, "drive%d.dsk", drive);
521 if (DiskUnZip((char*)imagefilename, tempdsk)) {
522 writeprotected = 1;
523 createifnecessary = 0;
524 tmp = tempdsk;
525 }
526526 }
527527
528528 fptr->writeprotected = writeprotected;
537537 snprintf(s_title, MAX_DISK_IMAGE_NAME + 32, "%s - %s", g_pAppTitle, tmp); //
538538 if(drive == 0) SDL_WM_SetCaption(s_title, g_pAppTitle);// change caption just for drive 0 (leading)
539539 printf("Disk is inserted. Full name = %s\n", /*g_aFloppyDisk[drive].fullname*/imagefilename);
540 }
541 else
542 {
543 printf("Error %d when inserting disk %s\n", error, imagefilename);
540544 }
541545 return error;
542546 }