Skip to content

Commit

Permalink
[#50] MDOS: Disk verification (Part 10.1: Fixed propagation of disk f…
Browse files Browse the repository at this point in the history
…ormat to CDos)
  • Loading branch information
tomas-nestorovic committed Jul 21, 2020
1 parent 67b9712 commit 1861452
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Main/src/MDOS2_Boot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@
p->driveError=d.error==BST_CHECKED;
p->driveLastSeekedCylinder=d.lastCylinder;
p->driveFlags.driveB=d.letter!=0;
p->driveFlags.driveD40=d.d40!=0;
CDos::GetFocused()->formatBoot.mediumType = (p->driveFlags.driveD40=d.d40!=0)
? TMedium::FLOPPY_DD_525
: TMedium::FLOPPY_DD_350;
p->driveFlags.doubleSided=d.doubleSided==BST_CHECKED;
p->driveFlags.fortyCylDiskInD80=d.dsk40cyl==BST_CHECKED;
p->driveFlags.stepSpeed=d.stepping;
Expand Down Expand Up @@ -331,6 +333,7 @@
break;
case IDYES:
boot->current.diskFlags.driveD40=false;
MDOS2->formatBoot.mediumType=TMedium::FLOPPY_DD_350;
IMAGE->MarkSectorAsDirty(CHS);
vp.fReport.CloseProblem(true);
break;
Expand All @@ -357,7 +360,9 @@
case IDNO:
break;
case IDYES:
boot->current.driveFlags.driveD40=!boot->current.driveFlags.driveD40;
MDOS2->formatBoot.mediumType = (boot->current.driveFlags.driveD40=!boot->current.driveFlags.driveD40)
? TMedium::FLOPPY_DD_525
: TMedium::FLOPPY_DD_350;
IMAGE->MarkSectorAsDirty(CHS);
vp.fReport.CloseProblem(true);
break;
Expand Down

0 comments on commit 1861452

Please sign in to comment.