Skip to content

Commit

Permalink
fix sound volume settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonnix1 committed Jul 24, 2018
1 parent 5201e2f commit 091e6ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions optionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
ui->checkBox_disableVideo->setChecked(mw->GetDisableVideo());
ui->checkBox_perGameConfig->setChecked(mw->GetPerGameConfig());
ui->checkBox_autostart->setChecked(mw->GetAutostart());
ui->horizontalSlider_volume->setValue(mw->GetOverallVolume() * 100);
ui->horizontalSlider_volume->setValue((int)(mw->GetOverallVolume() * 100));
ui->checkBox_videoFix->setChecked(mw->GetVideoFix());
ui->checkBox_HTML5Extras->setChecked(mw->GetAllowHTML5Extras());

Expand Down Expand Up @@ -146,8 +146,8 @@ void OptionsDialog::on_pushButton_ok_clicked()
mw->SetAllowHTML5Extras(ui->checkBox_HTML5Extras->isChecked());
if(ui->comboBox_language->count() > 0)
mw->SetLangID(ui->comboBox_language->itemData(ui->comboBox_language->currentIndex()).toString());
if(mw->GetOverallVolume() != ui->horizontalSlider_volume->value() / 100)
mw->SetOverallVolume(ui->horizontalSlider_volume->value() / 100);
if(mw->GetOverallVolume() != ui->horizontalSlider_volume->value() / 100.0f)
mw->SetOverallVolume(ui->horizontalSlider_volume->value() / 100.0f);

close();
}

0 comments on commit 091e6ee

Please sign in to comment.