[hatari-users] disk image filename not displayed after restoring a snapshot

Eero Tamminen oak at helsinkinet.fi
Sun Oct 9 20:33:49 CEST 2011


On sunnuntai 09 lokakuu 2011, Nicolas Pomarède wrote:
> Hello
> I noticed that if you press F12 and go into the floppy dialog after
> restoring a snapshot that contains an inserted disk, the filenames are
> not displayed in A: and B:
> The filename is correctly saved/restored in floppy.c :
> MemorySnapShot_Store(EmulationDrives[i].sFileName,
> sizeof(EmulationDrives[i].sFileName));
> But it's not copied into ConfigureParams.DiskImage.szDiskFileName[Drive]
> and ConfigureParams.DiskImage.szDiskZipPath[Drive]
> I don't think that calling Floppy_SetDiskFileName after restoring the
> snapshot, because it could auto insert disk B (which we don't want,
> because the user might have changed it before saving the snapshot).
> Is it enough to update those 2 DiskImage's variable, or are there side
> effect to take into account ?

No side-effects, but the floppy image might be inside a zip file
in which case you need to set also zip path.  Zip path comes
only from file selector.  It's used by:
	Floppy_InsertDiskIntoDrive() -> ZIP_ReadDisk()

When image filename is determined to be a ZIP archive.
Zip path tells the image file name within the ZIP archive.

	- Eero

More information about the hatari-users mailing list