Fix audio slider

This commit is contained in:
wheremyfoodat 2024-12-01 18:03:09 +02:00
parent 0665ab8724
commit 266e637790

View file

@ -264,7 +264,7 @@ ConfigWindow::ConfigWindow(Emulator* emu, QWidget* parent) : QDialog(parent), em
volumeRaw->setRange(0, 200); volumeRaw->setRange(0, 200);
volumeRaw->setValue(config.audioDeviceConfig.volumeRaw * 100); volumeRaw->setValue(config.audioDeviceConfig.volumeRaw * 100);
connect(volumeRaw, &QSpinBox::valueChanged, this, [&](int value) { connect(volumeRaw, &QSpinBox::valueChanged, this, [&](int value) {
config.audioDeviceConfig.volumeRaw = static_cast<int>(value) / 100; config.audioDeviceConfig.volumeRaw = static_cast<float>(value) / 100.0f;
config.save(); config.save();
}); });
spuLayout->addRow(tr("Audio device volume"), volumeRaw); spuLayout->addRow(tr("Audio device volume"), volumeRaw);