Skip to content

Commit

Permalink
[#30] Preview of current directory raw data in hexa mode (Part 22.1: …
Browse files Browse the repository at this point in the history
…Leveraging the CImage::ShowModalTrackTimingAt method)
  • Loading branch information
tomas-nestorovic committed Nov 15, 2022
1 parent a8b323c commit 2dbb3a0
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions Main/src/ViewDirectoryEntries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,23 +181,11 @@
RepaintData();
return TRUE;
}
case ID_TIME:{
case ID_TIME:
// display of low-level Track timing
f->Seek( GetCaretLogPos(), CFile::begin );
const TPhysicalAddress &chs=f->GetCurrentPhysicalAddress();
if (CImage::CTrackReader tr=IMAGE->ReadTrack( chs.cylinder, chs.head )){
TLogTime tDataStart;
if (IMAGE->GetSectorData( chs, 0, Revolution::ANY_GOOD, nullptr, nullptr, &tDataStart )!=nullptr){
const auto peList=tr.ScanAndAnalyze( CActionProgress::None, false );
const auto &peData=(CImage::CTrackReader::TDataParseEvent &)peList.GetAt(
peList.GetPositionByStart( tDataStart, CImage::CTrackReader::TParseEvent::DATA_OK, CImage::CTrackReader::TParseEvent::DATA_BAD )
);
const auto &bi=peData.byteInfos[ f->GetPositionInCurrentSector() ];
tr.ShowModal( nullptr, 0, MB_OK, true, bi.tStart, _T("KUNDA") );
}
}
IMAGE->ShowModalTrackTimingAt( f->GetCurrentPhysicalAddress(), 0, f->GetPositionInCurrentSector(), Revolution::ANY_GOOD );
return TRUE;
}
}
break;
}
Expand Down

0 comments on commit 2dbb3a0

Please sign in to comment.