1
0
Fork 0

Merge branch 'svn/trunk' r4308

This commit is contained in:
Patryk Obara 2020-01-13 00:40:58 +01:00
commit 2310498f79
2 changed files with 13 additions and 11 deletions

View file

@ -269,6 +269,16 @@ public:
goto showusage;
}
drive = static_cast<char>(i_drive);
if (type == "overlay") {
//Ensure that the base drive exists:
if (!Drives[drive-'A']) {
WriteOut("No basedrive mounted yet!");
return;
}
} else if (Drives[drive-'A']) {
WriteOut(MSG_Get("PROGRAM_MOUNT_ALREADY_MOUNTED"),drive,Drives[drive-'A']->GetInfo());
return;
}
if (!cmd->FindCommand(2,temp_line)) {
goto showusage;
@ -349,11 +359,6 @@ public:
if(temp_line == "/") WriteOut(MSG_Get("PROGRAM_MOUNT_WARNING_OTHER"));
#endif
if(type == "overlay") {
//Ensure that the base drive exists:
if (!Drives[drive - 'A']) {
WriteOut("No basedrive mounted yet!");
return;
}
localDrive* ldp = dynamic_cast<localDrive*>(Drives[drive - 'A']);
cdromDrive* cdp = dynamic_cast<cdromDrive*>(Drives[drive - 'A']);
if (!ldp || cdp) {
@ -386,11 +391,6 @@ public:
WriteOut(MSG_Get("PROGRAM_MOUNT_ILL_TYPE"),type.c_str());
return;
}
if (Drives[drive - 'A']) {
WriteOut(MSG_Get("PROGRAM_MOUNT_ALREADY_MOUNTED"),drive,Drives[drive - 'A']->GetInfo());
if (newdrive) delete newdrive;
return;
}
if (!newdrive) E_Exit("DOS:Can't create drive");
Drives[drive - 'A'] = newdrive;
/* Set the correct media byte in the table */

View file

@ -294,7 +294,9 @@ static void DSP_DMA_CallBack(DmaChannel * chan, DMAEvent event) {
if (!min_size) min_size = 1;
min_size *= 2;
if (sb.dma.left > min_size) {
if (s > (sb.dma.left-min_size)) s = sb.dma.left - min_size;
if (s > (sb.dma.left - min_size)) s = sb.dma.left - min_size;
//This will trigger a irq, see GenerateDMASound, so lets not do that
if (!sb.dma.autoinit && sb.dma.left <= sb.dma.min) s = 0;
if (s) GenerateDMASound(s);
}
sb.mode = MODE_DMA_MASKED;