Allow writing to Greaseweazle disks again by not setting hardSectorThresholdNs

to inf...
This commit is contained in:
David Given
2023-05-25 21:26:44 +02:00
parent 2bef6ca646
commit b4d8d569d2

View File

@@ -83,9 +83,12 @@ void measureDiskRotation()
if (!globalConfig()->drive().hard_sector_threshold_ns())
{
int count = globalConfig()->drive().hard_sector_count();
globalConfig().setTransient("drive.hard_sector_threshold_ns",
std::to_string(oneRevolution * 3 /
(4 * globalConfig()->drive().hard_sector_count())));
count ? std::to_string(
oneRevolution * 3 /
(4 * globalConfig()->drive().hard_sector_count()))
: "0");
}
if (oneRevolution == 0)