Fixed autoMount overrides (formerly, machines that wanted to override the diskette autoMount settings for a machine would set "autoMount: ''", but that was a sledgehammer solution, especially when the goal was merely to prevent a diskette from being loaded in drive A; the preferred solution now is to set "autoMount: A: None", allowing the rest of the machine's autoMount settings, if any, to remain intact)
This commit is contained in:
parent
cb43a6b360
commit
6d019e7d9d
10 changed files with 28 additions and 20 deletions
|
|
@ -465,10 +465,8 @@ class FDC extends Component {
|
|||
} else {
|
||||
config = {};
|
||||
}
|
||||
if (configMerge) {
|
||||
for (var drive in config) {
|
||||
configMerge[drive] = config[drive];
|
||||
}
|
||||
for (var sDrive in config) {
|
||||
if (configMerge) configMerge[sDrive] = config[sDrive];
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
|
@ -1087,21 +1085,21 @@ class FDC extends Component {
|
|||
for (var sDrive in this.configMount) {
|
||||
var configDrive = this.configMount[sDrive];
|
||||
var sDiskettePath = configDrive['path'] || "";
|
||||
var sDisketteName = configDrive['name'] || this.findDiskette(sDiskettePath);
|
||||
if (sDiskettePath && sDisketteName) {
|
||||
if (sDiskettePath) {
|
||||
/*
|
||||
* WARNING: This conversion of drive letter to drive number, starting with A:, is very simplistic
|
||||
* and is not guaranteed to match the drive mapping that DOS ultimately uses.
|
||||
*/
|
||||
var iDrive = sDrive.charCodeAt(0) - 0x41;
|
||||
if (iDrive >= 0 && iDrive < this.aDrives.length) {
|
||||
var sDisketteName = configDrive['name'] || this.findDiskette(sDiskettePath) || "Unknown";
|
||||
if (!this.loadDrive(iDrive, sDisketteName, sDiskettePath, true) && fRemount) {
|
||||
this.setReady(false);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
this.notice("Incorrect auto-mount settings for drive " + sDrive + " (" + JSON.stringify(configDrive) + ")");
|
||||
}
|
||||
this.notice("Incorrect auto-mount settings for drive " + sDrive + " (" + JSON.stringify(configDrive) + ")");
|
||||
}
|
||||
return !!this.cAutoMount;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue