From 88bbaeae49f4b0a727299ee53c87a6e0b07863a3 Mon Sep 17 00:00:00 2001 From: HolographicWings Date: Fri, 19 May 2023 07:25:46 +0200 Subject: [PATCH] Fixed coding style of codec.cpp and configure_general.cpp --- src/video_core/host1x/codecs/codec.cpp | 6 ++++-- src/yuzu/configuration/configure_general.cpp | 15 +++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/video_core/host1x/codecs/codec.cpp b/src/video_core/host1x/codecs/codec.cpp index 3d5fcbb5d2..fba947e8b3 100644 --- a/src/video_core/host1x/codecs/codec.cpp +++ b/src/video_core/host1x/codecs/codec.cpp @@ -290,8 +290,10 @@ AVFramePtr Codec::GetCurrentFrame() { if (Settings::values.use_video_framerate.GetValue()) { std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); - std::chrono::microseconds elapsed = std::chrono::duration_cast(now - last_frame_time); - std::chrono::microseconds min_frame_interval = std::chrono::microseconds(1000 / Settings::values.video_framerate.GetValue() * 1000); + std::chrono::microseconds elapsed = + std::chrono::duration_cast(now - last_frame_time); + std::chrono::microseconds min_frame_interval = + std::chrono::microseconds(1000 / Settings::values.video_framerate.GetValue() * 1000); if (elapsed < min_frame_interval) { std::this_thread::sleep_for(min_frame_interval - elapsed); diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index 8e711643cc..d161f31d20 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -56,7 +56,9 @@ void ConfigureGeneral::SetConfiguration() { ui->video_framerate->setEnabled(Settings::values.use_video_framerate.GetValue()); ui->speed_limit->setEnabled(Settings::values.use_speed_limit.GetValue()); } else { - ui->video_framerate->setEnabled(Settings::values.use_video_framerate.GetValue() && use_video_framerate != ConfigurationShared::CheckState::Global); + ui->video_framerate->setEnabled(Settings::values.use_video_framerate.GetValue() && + use_video_framerate != + ConfigurationShared::CheckState::Global); ui->speed_limit->setEnabled(Settings::values.use_speed_limit.GetValue() && use_speed_limit != ConfigurationShared::CheckState::Global); } @@ -93,8 +95,7 @@ void ConfigureGeneral::ApplyConfiguration() { if (Settings::values.use_video_framerate.UsingGlobal()) { Settings::values.use_video_framerate.SetValue( - ui->toggle_video_framerate->checkState() == - Qt::Checked); + ui->toggle_video_framerate->checkState() == Qt::Checked); Settings::values.video_framerate.SetValue(ui->video_framerate->value()); } // Guard if during game and set to game-specific value @@ -147,15 +148,17 @@ void ConfigureGeneral::SetupPerGameUI() { ui->button_reset_defaults->setVisible(false); - ConfigurationShared::SetColoredTristate(ui->toggle_video_framerate, Settings::values.use_video_framerate, use_video_framerate); + ConfigurationShared::SetColoredTristate( + ui->toggle_video_framerate, Settings::values.use_video_framerate, use_video_framerate); ConfigurationShared::SetColoredTristate(ui->toggle_speed_limit, Settings::values.use_speed_limit, use_speed_limit); ConfigurationShared::SetColoredTristate(ui->use_multi_core, Settings::values.use_multi_core, use_multi_core); connect(ui->toggle_video_framerate, &QCheckBox::clicked, ui->video_framerate, [this]() { - ui->video_framerate->setEnabled(ui->toggle_video_framerate->isChecked() && - (use_video_framerate != ConfigurationShared::CheckState::Global)); + ui->video_framerate->setEnabled( + ui->toggle_video_framerate->isChecked() && + (use_video_framerate != ConfigurationShared::CheckState::Global)); }); connect(ui->toggle_speed_limit, &QCheckBox::clicked, ui->speed_limit, [this]() { ui->speed_limit->setEnabled(ui->toggle_speed_limit->isChecked() &&