FDC hacks to deal with recent disk path changes and disk file name case changes
This commit is contained in:
parent
706e51838b
commit
e8ba4aedc5
1 changed files with 9 additions and 1 deletions
|
|
@ -1400,8 +1400,16 @@ FDC.prototype.loadDiskette = function(iDrive, sDisketteName, sDiskettePath, fAut
|
|||
{
|
||||
var drive = this.aDrives[iDrive];
|
||||
if (sDiskettePath) {
|
||||
/*
|
||||
* TODO: This code contains two hacks that should eventually be eliminated: first, machines
|
||||
* with saved states may attempt to load disks using old paths, so we replace the old path
|
||||
* with the new, and second, they be using lower-case disk image names, whereas we now use
|
||||
* UPPER-CASE names for disk images, so we lower-case both before comparing. The only problem
|
||||
* with removing these hacks is that we can never be sure when all saved states in the wild
|
||||
* have been updated....
|
||||
*/
|
||||
sDiskettePath = sDiskettePath.replace("/disks/pc/", "/disks/pcx86/");
|
||||
if (drive.sDiskettePath != sDiskettePath) {
|
||||
if (drive.sDiskettePath.toLowerCase() != sDiskettePath.toLowerCase()) {
|
||||
this.unloadDrive(iDrive, fAutoMount, true);
|
||||
if (drive.fBusy) {
|
||||
this.notice("Drive " + iDrive + " busy");
|
||||
|
|
|
|||
Loading…
Reference in a new issue