From 2184968eb4685b04fd300fd1f14021f561416303 Mon Sep 17 00:00:00 2001 From: spectranator Date: Mon, 13 May 2024 23:11:32 +0200 Subject: [PATCH] Applied clang-format --- src/common/settings.h | 3 ++- src/core/core_timing.cpp | 7 ++++--- src/core/hle/service/acc/acc.cpp | 4 ++-- src/network/announce_multiplayer_session.cpp | 1 - src/yuzu/configuration/shared_translation.cpp | 13 +++++++----- src/yuzu/main.cpp | 20 ++++++++++++------- 6 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/common/settings.h b/src/common/settings.h index ffcdb811d..2ea310e13 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -210,7 +210,8 @@ struct Values { true, true, &use_speed_limit}; - SwitchableSetting sync_core_speed{linkage, false, "sync_core_speed", Category::Core, Specialization::Default}; + SwitchableSetting sync_core_speed{linkage, false, "sync_core_speed", Category::Core, + Specialization::Default}; // Cpu SwitchableSetting cpu_backend{linkage, diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 057688269..cb31a3b45 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -14,8 +14,8 @@ #include "common/x64/cpu_wait.h" #endif -#include "common/settings.h" #include "common/microprofile.h" +#include "common/settings.h" #include "core/core_timing.h" #include "core/hardware_properties.h" @@ -194,8 +194,9 @@ u64 CoreTiming::GetClockTicks() const { if (Settings::values.sync_core_speed.GetValue()) { const double ticks = static_cast(fres); - const double speed_limit = static_cast(Settings::values.speed_limit.GetValue())*0.01; - return static_cast(ticks/speed_limit); + const double speed_limit = + static_cast(Settings::values.speed_limit.GetValue()) * 0.01; + return static_cast(ticks / speed_limit); } else { return fres; } diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 4464e4af9..671b33b4b 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -324,8 +324,8 @@ public: {10, &IProfileCommon::GetImageSize, "GetImageSize"}, {11, &IProfileCommon::LoadImage, "LoadImage"}, {20, &IProfileCommon::GetImageSize, "GetLargeImageSize"}, // 18.0.0+ - {21, &IProfileCommon::LoadImage, "LoadLargeImage"}, // 18.0.0+ - {30, &IProfileCommon::Unknown, "GetImageId"} // 18.0.0+ + {21, &IProfileCommon::LoadImage, "LoadLargeImage"}, // 18.0.0+ + {30, &IProfileCommon::Unknown, "GetImageId"} // 18.0.0+ }; RegisterHandlers(functions); diff --git a/src/network/announce_multiplayer_session.cpp b/src/network/announce_multiplayer_session.cpp index 98339cc58..c61141efd 100644 --- a/src/network/announce_multiplayer_session.cpp +++ b/src/network/announce_multiplayer_session.cpp @@ -7,7 +7,6 @@ #include "announce_multiplayer_session.h" #include "common/announce_multiplayer_room.h" #include "common/assert.h" -#include "common/settings.h" #include "network/network.h" namespace Core { diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 6b5d990f0..56ee9f000 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -71,11 +71,14 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { "faster or not.\n200% for a 30 FPS game is 60 FPS, and for a " "60 FPS game it will be 120 FPS.\nDisabling it means unlocking the framerate to the " "maximum your PC can reach.")); - INSERT(Settings, sync_core_speed, tr("Synchronize core speed"), - tr("Synchronizes CPU core speed to game's maximum rendering speed, which can be useful to " - "increase FPS without increasing the actual speed of the game (animations, physics, etc.)\n" - "It's up to each game if it plays well with this or not. Most games (specially original ones) " - "simply ignore this.\nThis can help play the game stutter-free at a lower framerate.")); + INSERT( + Settings, sync_core_speed, tr("Synchronize core speed"), + tr("Synchronizes CPU core speed to game's maximum rendering speed, which can be useful to " + "increase FPS without increasing the actual speed of the game (animations, physics, " + "etc.)\n" + "It's up to each game if it plays well with this or not. Most games (specially original " + "ones) " + "simply ignore this.\nThis can help play the game stutter-free at a lower framerate.")); // Cpu INSERT(Settings, cpu_accuracy, tr("Accuracy:"), diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 6c58c5558..a08172416 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -21,8 +21,8 @@ #include "common/linux/gamemode.h" #endif -#include #include +#include // VFS includes must be before glad as they will conflict with Windows file api, which uses defines. #include "applets/qt_amiibo_settings.h" @@ -3523,12 +3523,18 @@ void GMainWindow::OnOpenMirrorRepo() { httplib::Client cli("https://codeberg.org"); auto res = cli.Get("/litucks/tz-mu/raw/branch/main/mu.txt"); if (!res) { - QMessageBox::warning(this, tr("Error locating mirror"), tr("There has been an error finding the current mirror repository.
" - "Your version may be too old or your network connectivity may be" - "limited.
" - "Please either try again later, through a VPN or access the main
" - "repository via the Tor Browser:
" - "http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu")); + QMessageBox::warning( + this, tr("Error locating mirror"), + tr("There has been an error finding the current mirror repository.
" + "Your version may be too old or your network connectivity may be" + "limited.
" + "Please either try again later, through a VPN or access the main
" + "repository via the Tor Browser:
" + "http://" + "y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu")); } OpenURL(QUrl(QString::fromStdString(res->body)));