Remember to set the high density bit.

This commit is contained in:
David Given
2022-02-27 13:11:11 +01:00
parent 47dde98728
commit 4624ff92df
2 changed files with 14 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ void MainWindow::OnReadFluxButton(wxCommandEvent&)
visualiser->Clear();
_currentDisk = nullptr;
SetHighDensity();
ShowConfig();
runOnWorkerThread(
[this]()
@@ -109,6 +110,7 @@ void MainWindow::OnWriteFluxButton(wxCommandEvent&)
FluxSource::updateConfigForFilename(config.mutable_flux_source(),
fluxSourceSinkCombo->GetValue().ToStdString());
SetHighDensity();
ShowConfig();
auto image = _currentDisk->image;
runOnWorkerThread(
@@ -237,6 +239,15 @@ void MainWindow::PrepareConfig()
logEntry->Clear();
}
void MainWindow::SetHighDensity()
{
bool hd = highDensityToggle->GetValue();
if (config.flux_source().has_drive())
config.mutable_flux_source()->mutable_drive()->set_high_density(hd);
if (config.flux_sink().has_drive())
config.mutable_flux_sink()->mutable_drive()->set_high_density(hd);
}
void MainWindow::ShowConfig()
{
std::string s;

View File

@@ -29,6 +29,9 @@ public:
void ShowConfig();
void ApplyCustomSettings();
private:
void SetHighDensity();
private:
std::vector<std::unique_ptr<const ConfigProto>> _formats;
std::vector<std::unique_ptr<const CandidateDevice>> _devices;