diff options
Diffstat (limited to 'src')
35 files changed, 139 insertions, 153 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9182dbfd4..39d038493 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt | |||
| @@ -65,6 +65,10 @@ if (MSVC) | |||
| 65 | /we4305 # 'context': truncation from 'type1' to 'type2' | 65 | /we4305 # 'context': truncation from 'type1' to 'type2' |
| 66 | /we4388 # 'expression': signed/unsigned mismatch | 66 | /we4388 # 'expression': signed/unsigned mismatch |
| 67 | /we4389 # 'operator': signed/unsigned mismatch | 67 | /we4389 # 'operator': signed/unsigned mismatch |
| 68 | /we4456 # Declaration of 'identifier' hides previous local declaration | ||
| 69 | /we4457 # Declaration of 'identifier' hides function parameter | ||
| 70 | /we4458 # Declaration of 'identifier' hides class member | ||
| 71 | /we4459 # Declaration of 'identifier' hides global declaration | ||
| 68 | /we4505 # 'function': unreferenced local function has been removed | 72 | /we4505 # 'function': unreferenced local function has been removed |
| 69 | /we4547 # 'operator': operator before comma has no effect; expected operator with side-effect | 73 | /we4547 # 'operator': operator before comma has no effect; expected operator with side-effect |
| 70 | /we4549 # 'operator1': operator before comma has no effect; did you intend 'operator2'? | 74 | /we4549 # 'operator1': operator before comma has no effect; did you intend 'operator2'? |
| @@ -92,6 +96,7 @@ else() | |||
| 92 | -Werror=missing-declarations | 96 | -Werror=missing-declarations |
| 93 | -Werror=missing-field-initializers | 97 | -Werror=missing-field-initializers |
| 94 | -Werror=reorder | 98 | -Werror=reorder |
| 99 | -Werror=shadow | ||
| 95 | -Werror=sign-compare | 100 | -Werror=sign-compare |
| 96 | -Werror=switch | 101 | -Werror=switch |
| 97 | -Werror=uninitialized | 102 | -Werror=uninitialized |
diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index e553b8203..89575a53e 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt | |||
| @@ -49,9 +49,6 @@ if (NOT MSVC) | |||
| 49 | target_compile_options(audio_core PRIVATE | 49 | target_compile_options(audio_core PRIVATE |
| 50 | -Werror=conversion | 50 | -Werror=conversion |
| 51 | -Werror=ignored-qualifiers | 51 | -Werror=ignored-qualifiers |
| 52 | -Werror=shadow | ||
| 53 | -Werror=unused-parameter | ||
| 54 | -Werror=unused-variable | ||
| 55 | 52 | ||
| 56 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | 53 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> |
| 57 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | 54 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> |
diff --git a/src/common/detached_tasks.cpp b/src/common/detached_tasks.cpp index c1362631e..ec31d0b88 100644 --- a/src/common/detached_tasks.cpp +++ b/src/common/detached_tasks.cpp | |||
| @@ -33,9 +33,9 @@ void DetachedTasks::AddTask(std::function<void()> task) { | |||
| 33 | ++instance->count; | 33 | ++instance->count; |
| 34 | std::thread([task{std::move(task)}]() { | 34 | std::thread([task{std::move(task)}]() { |
| 35 | task(); | 35 | task(); |
| 36 | std::unique_lock lock{instance->mutex}; | 36 | std::unique_lock thread_lock{instance->mutex}; |
| 37 | --instance->count; | 37 | --instance->count; |
| 38 | std::notify_all_at_thread_exit(instance->cv, std::move(lock)); | 38 | std::notify_all_at_thread_exit(instance->cv, std::move(thread_lock)); |
| 39 | }).detach(); | 39 | }).detach(); |
| 40 | } | 40 | } |
| 41 | 41 | ||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 2bd720f08..670410e75 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -743,16 +743,11 @@ if (MSVC) | |||
| 743 | /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data | 743 | /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data |
| 744 | /we4245 # 'conversion': conversion from 'type1' to 'type2', signed/unsigned mismatch | 744 | /we4245 # 'conversion': conversion from 'type1' to 'type2', signed/unsigned mismatch |
| 745 | /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data | 745 | /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data |
| 746 | /we4456 # Declaration of 'identifier' hides previous local declaration | ||
| 747 | /we4457 # Declaration of 'identifier' hides function parameter | ||
| 748 | /we4458 # Declaration of 'identifier' hides class member | ||
| 749 | /we4459 # Declaration of 'identifier' hides global declaration | ||
| 750 | ) | 746 | ) |
| 751 | else() | 747 | else() |
| 752 | target_compile_options(core PRIVATE | 748 | target_compile_options(core PRIVATE |
| 753 | -Werror=conversion | 749 | -Werror=conversion |
| 754 | -Werror=ignored-qualifiers | 750 | -Werror=ignored-qualifiers |
| 755 | -Werror=shadow | ||
| 756 | 751 | ||
| 757 | $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> | 752 | $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> |
| 758 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | 753 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> |
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index d4fa69a77..48e799cf5 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -44,7 +44,6 @@ else() | |||
| 44 | -Werror | 44 | -Werror |
| 45 | -Werror=conversion | 45 | -Werror=conversion |
| 46 | -Werror=ignored-qualifiers | 46 | -Werror=ignored-qualifiers |
| 47 | -Werror=shadow | ||
| 48 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | 47 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> |
| 49 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | 48 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> |
| 50 | -Werror=unused-variable | 49 | -Werror=unused-variable |
diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt index 4c76ce1ea..ae1dbe619 100644 --- a/src/shader_recompiler/CMakeLists.txt +++ b/src/shader_recompiler/CMakeLists.txt | |||
| @@ -253,9 +253,6 @@ else() | |||
| 253 | -Werror | 253 | -Werror |
| 254 | -Werror=conversion | 254 | -Werror=conversion |
| 255 | -Werror=ignored-qualifiers | 255 | -Werror=ignored-qualifiers |
| 256 | -Werror=implicit-fallthrough | ||
| 257 | -Werror=shadow | ||
| 258 | -Werror=sign-compare | ||
| 259 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | 256 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> |
| 260 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | 257 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> |
| 261 | -Werror=unused-variable | 258 | -Werror=unused-variable |
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 256695804..14de7bc89 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt | |||
| @@ -258,10 +258,6 @@ if (MSVC) | |||
| 258 | target_compile_options(video_core PRIVATE | 258 | target_compile_options(video_core PRIVATE |
| 259 | /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data | 259 | /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data |
| 260 | /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data | 260 | /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data |
| 261 | /we4456 # Declaration of 'identifier' hides previous local declaration | ||
| 262 | /we4457 # Declaration of 'identifier' hides function parameter | ||
| 263 | /we4458 # Declaration of 'identifier' hides class member | ||
| 264 | /we4459 # Declaration of 'identifier' hides global declaration | ||
| 265 | ) | 261 | ) |
| 266 | else() | 262 | else() |
| 267 | target_compile_options(video_core PRIVATE | 263 | target_compile_options(video_core PRIVATE |
| @@ -269,7 +265,6 @@ else() | |||
| 269 | -Wno-error=sign-conversion | 265 | -Wno-error=sign-conversion |
| 270 | -Werror=pessimizing-move | 266 | -Werror=pessimizing-move |
| 271 | -Werror=redundant-move | 267 | -Werror=redundant-move |
| 272 | -Werror=shadow | ||
| 273 | -Werror=type-limits | 268 | -Werror=type-limits |
| 274 | 269 | ||
| 275 | $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> | 270 | $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> |
diff --git a/src/web_service/telemetry_json.cpp b/src/web_service/telemetry_json.cpp index 6215c914f..46faddb61 100644 --- a/src/web_service/telemetry_json.cpp +++ b/src/web_service/telemetry_json.cpp | |||
| @@ -13,8 +13,8 @@ namespace WebService { | |||
| 13 | namespace Telemetry = Common::Telemetry; | 13 | namespace Telemetry = Common::Telemetry; |
| 14 | 14 | ||
| 15 | struct TelemetryJson::Impl { | 15 | struct TelemetryJson::Impl { |
| 16 | Impl(std::string host, std::string username, std::string token) | 16 | Impl(std::string host_, std::string username_, std::string token_) |
| 17 | : host{std::move(host)}, username{std::move(username)}, token{std::move(token)} {} | 17 | : host{std::move(host_)}, username{std::move(username_)}, token{std::move(token_)} {} |
| 18 | 18 | ||
| 19 | nlohmann::json& TopSection() { | 19 | nlohmann::json& TopSection() { |
| 20 | return sections[static_cast<u8>(Telemetry::FieldType::None)]; | 20 | return sections[static_cast<u8>(Telemetry::FieldType::None)]; |
diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index 58b0c2f10..dce9772fe 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp | |||
| @@ -30,10 +30,10 @@ constexpr std::array<const char, 1> API_VERSION{'1'}; | |||
| 30 | constexpr std::size_t TIMEOUT_SECONDS = 30; | 30 | constexpr std::size_t TIMEOUT_SECONDS = 30; |
| 31 | 31 | ||
| 32 | struct Client::Impl { | 32 | struct Client::Impl { |
| 33 | Impl(std::string host, std::string username, std::string token) | 33 | Impl(std::string host_, std::string username_, std::string token_) |
| 34 | : host{std::move(host)}, username{std::move(username)}, token{std::move(token)} { | 34 | : host{std::move(host_)}, username{std::move(username_)}, token{std::move(token_)} { |
| 35 | std::scoped_lock lock{jwt_cache.mutex}; | 35 | std::scoped_lock lock{jwt_cache.mutex}; |
| 36 | if (this->username == jwt_cache.username && this->token == jwt_cache.token) { | 36 | if (username == jwt_cache.username && token == jwt_cache.token) { |
| 37 | jwt = jwt_cache.jwt; | 37 | jwt = jwt_cache.jwt; |
| 38 | } | 38 | } |
| 39 | } | 39 | } |
| @@ -69,8 +69,8 @@ struct Client::Impl { | |||
| 69 | */ | 69 | */ |
| 70 | WebResult GenericRequest(const std::string& method, const std::string& path, | 70 | WebResult GenericRequest(const std::string& method, const std::string& path, |
| 71 | const std::string& data, const std::string& accept, | 71 | const std::string& data, const std::string& accept, |
| 72 | const std::string& jwt = "", const std::string& username = "", | 72 | const std::string& jwt_ = "", const std::string& username_ = "", |
| 73 | const std::string& token = "") { | 73 | const std::string& token_ = "") { |
| 74 | if (cli == nullptr) { | 74 | if (cli == nullptr) { |
| 75 | cli = std::make_unique<httplib::Client>(host.c_str()); | 75 | cli = std::make_unique<httplib::Client>(host.c_str()); |
| 76 | } | 76 | } |
| @@ -85,14 +85,14 @@ struct Client::Impl { | |||
| 85 | cli->set_write_timeout(TIMEOUT_SECONDS); | 85 | cli->set_write_timeout(TIMEOUT_SECONDS); |
| 86 | 86 | ||
| 87 | httplib::Headers params; | 87 | httplib::Headers params; |
| 88 | if (!jwt.empty()) { | 88 | if (!jwt_.empty()) { |
| 89 | params = { | 89 | params = { |
| 90 | {std::string("Authorization"), fmt::format("Bearer {}", jwt)}, | 90 | {std::string("Authorization"), fmt::format("Bearer {}", jwt_)}, |
| 91 | }; | 91 | }; |
| 92 | } else if (!username.empty()) { | 92 | } else if (!username_.empty()) { |
| 93 | params = { | 93 | params = { |
| 94 | {std::string("x-username"), username}, | 94 | {std::string("x-username"), username_}, |
| 95 | {std::string("x-token"), token}, | 95 | {std::string("x-token"), token_}, |
| 96 | }; | 96 | }; |
| 97 | } | 97 | } |
| 98 | 98 | ||
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index bde465485..cbe4e2daa 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp | |||
| @@ -127,7 +127,7 @@ void EmuThread::run() { | |||
| 127 | class OpenGLSharedContext : public Core::Frontend::GraphicsContext { | 127 | class OpenGLSharedContext : public Core::Frontend::GraphicsContext { |
| 128 | public: | 128 | public: |
| 129 | /// Create the original context that should be shared from | 129 | /// Create the original context that should be shared from |
| 130 | explicit OpenGLSharedContext(QSurface* surface) : surface(surface) { | 130 | explicit OpenGLSharedContext(QSurface* surface_) : surface{surface_} { |
| 131 | QSurfaceFormat format; | 131 | QSurfaceFormat format; |
| 132 | format.setVersion(4, 6); | 132 | format.setVersion(4, 6); |
| 133 | format.setProfile(QSurfaceFormat::CompatibilityProfile); | 133 | format.setProfile(QSurfaceFormat::CompatibilityProfile); |
| @@ -364,9 +364,9 @@ void GRenderWindow::RestoreGeometry() { | |||
| 364 | QWidget::restoreGeometry(geometry); | 364 | QWidget::restoreGeometry(geometry); |
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | void GRenderWindow::restoreGeometry(const QByteArray& geometry) { | 367 | void GRenderWindow::restoreGeometry(const QByteArray& geometry_) { |
| 368 | // Make sure users of this class don't need to deal with backing up the geometry themselves | 368 | // Make sure users of this class don't need to deal with backing up the geometry themselves |
| 369 | QWidget::restoreGeometry(geometry); | 369 | QWidget::restoreGeometry(geometry_); |
| 370 | BackupGeometry(); | 370 | BackupGeometry(); |
| 371 | } | 371 | } |
| 372 | 372 | ||
| @@ -1014,8 +1014,8 @@ QStringList GRenderWindow::GetUnsupportedGLExtensions() const { | |||
| 1014 | return unsupported_ext; | 1014 | return unsupported_ext; |
| 1015 | } | 1015 | } |
| 1016 | 1016 | ||
| 1017 | void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread) { | 1017 | void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread_) { |
| 1018 | this->emu_thread = emu_thread; | 1018 | emu_thread = emu_thread_; |
| 1019 | } | 1019 | } |
| 1020 | 1020 | ||
| 1021 | void GRenderWindow::OnEmulationStopping() { | 1021 | void GRenderWindow::OnEmulationStopping() { |
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index d01538039..81fe52c0e 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h | |||
| @@ -56,12 +56,12 @@ public: | |||
| 56 | 56 | ||
| 57 | /** | 57 | /** |
| 58 | * Sets whether the emulation thread is running or not | 58 | * Sets whether the emulation thread is running or not |
| 59 | * @param running Boolean value, set the emulation thread to running if true | 59 | * @param running_ Boolean value, set the emulation thread to running if true |
| 60 | * @note This function is thread-safe | 60 | * @note This function is thread-safe |
| 61 | */ | 61 | */ |
| 62 | void SetRunning(bool running) { | 62 | void SetRunning(bool running_) { |
| 63 | std::unique_lock lock{running_mutex}; | 63 | std::unique_lock lock{running_mutex}; |
| 64 | this->running = running; | 64 | running = running_; |
| 65 | lock.unlock(); | 65 | lock.unlock(); |
| 66 | running_cv.notify_all(); | 66 | running_cv.notify_all(); |
| 67 | if (!running) { | 67 | if (!running) { |
| @@ -138,8 +138,8 @@ public: | |||
| 138 | 138 | ||
| 139 | void BackupGeometry(); | 139 | void BackupGeometry(); |
| 140 | void RestoreGeometry(); | 140 | void RestoreGeometry(); |
| 141 | void restoreGeometry(const QByteArray& geometry); // overridden | 141 | void restoreGeometry(const QByteArray& geometry_); // overridden |
| 142 | QByteArray saveGeometry(); // overridden | 142 | QByteArray saveGeometry(); // overridden |
| 143 | 143 | ||
| 144 | qreal windowPixelRatio() const; | 144 | qreal windowPixelRatio() const; |
| 145 | 145 | ||
| @@ -189,7 +189,7 @@ public: | |||
| 189 | void Exit(); | 189 | void Exit(); |
| 190 | 190 | ||
| 191 | public slots: | 191 | public slots: |
| 192 | void OnEmulationStarting(EmuThread* emu_thread); | 192 | void OnEmulationStarting(EmuThread* emu_thread_); |
| 193 | void OnEmulationStopping(); | 193 | void OnEmulationStopping(); |
| 194 | void OnFramebufferSizeChanged(); | 194 | void OnFramebufferSizeChanged(); |
| 195 | 195 | ||
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp index b415a1cc4..e99657bd6 100644 --- a/src/yuzu/configuration/configure_dialog.cpp +++ b/src/yuzu/configuration/configure_dialog.cpp | |||
| @@ -27,12 +27,11 @@ | |||
| 27 | #include "yuzu/hotkeys.h" | 27 | #include "yuzu/hotkeys.h" |
| 28 | #include "yuzu/uisettings.h" | 28 | #include "yuzu/uisettings.h" |
| 29 | 29 | ||
| 30 | ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry, | 30 | ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_, |
| 31 | InputCommon::InputSubsystem* input_subsystem, | 31 | InputCommon::InputSubsystem* input_subsystem, |
| 32 | Core::System& system_) | 32 | Core::System& system_) |
| 33 | : QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()}, | 33 | : QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()}, registry{registry_}, |
| 34 | registry(registry), system{system_}, audio_tab{std::make_unique<ConfigureAudio>(system_, | 34 | system{system_}, audio_tab{std::make_unique<ConfigureAudio>(system_, this)}, |
| 35 | this)}, | ||
| 36 | cpu_tab{std::make_unique<ConfigureCpu>(system_, this)}, | 35 | cpu_tab{std::make_unique<ConfigureCpu>(system_, this)}, |
| 37 | debug_tab_tab{std::make_unique<ConfigureDebugTab>(system_, this)}, | 36 | debug_tab_tab{std::make_unique<ConfigureDebugTab>(system_, this)}, |
| 38 | filesystem_tab{std::make_unique<ConfigureFilesystem>(this)}, | 37 | filesystem_tab{std::make_unique<ConfigureFilesystem>(this)}, |
diff --git a/src/yuzu/configuration/configure_dialog.h b/src/yuzu/configuration/configure_dialog.h index 32ddfd4e0..12cf25daf 100644 --- a/src/yuzu/configuration/configure_dialog.h +++ b/src/yuzu/configuration/configure_dialog.h | |||
| @@ -40,7 +40,7 @@ class ConfigureDialog : public QDialog { | |||
| 40 | Q_OBJECT | 40 | Q_OBJECT |
| 41 | 41 | ||
| 42 | public: | 42 | public: |
| 43 | explicit ConfigureDialog(QWidget* parent, HotkeyRegistry& registry, | 43 | explicit ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_, |
| 44 | InputCommon::InputSubsystem* input_subsystem, Core::System& system_); | 44 | InputCommon::InputSubsystem* input_subsystem, Core::System& system_); |
| 45 | ~ConfigureDialog() override; | 45 | ~ConfigureDialog() override; |
| 46 | 46 | ||
diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 1c05dd0f3..f3be9a374 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp | |||
| @@ -264,15 +264,16 @@ QString ConfigureInputPlayer::AnalogToText(const Common::ParamPackage& param, | |||
| 264 | return QObject::tr("[unknown]"); | 264 | return QObject::tr("[unknown]"); |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_index, | 267 | ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_index_, |
| 268 | QWidget* bottom_row, | 268 | QWidget* bottom_row_, |
| 269 | InputCommon::InputSubsystem* input_subsystem_, | 269 | InputCommon::InputSubsystem* input_subsystem_, |
| 270 | InputProfiles* profiles_, Core::HID::HIDCore& hid_core_, | 270 | InputProfiles* profiles_, Core::HID::HIDCore& hid_core_, |
| 271 | bool is_powered_on_, bool debug) | 271 | bool is_powered_on_, bool debug_) |
| 272 | : QWidget(parent), ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index(player_index), | 272 | : QWidget(parent), |
| 273 | debug(debug), is_powered_on{is_powered_on_}, input_subsystem{input_subsystem_}, | 273 | ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index{player_index_}, debug{debug_}, |
| 274 | profiles(profiles_), timeout_timer(std::make_unique<QTimer>()), | 274 | is_powered_on{is_powered_on_}, input_subsystem{input_subsystem_}, profiles(profiles_), |
| 275 | poll_timer(std::make_unique<QTimer>()), bottom_row(bottom_row), hid_core{hid_core_} { | 275 | timeout_timer(std::make_unique<QTimer>()), |
| 276 | poll_timer(std::make_unique<QTimer>()), bottom_row{bottom_row_}, hid_core{hid_core_} { | ||
| 276 | if (player_index == 0) { | 277 | if (player_index == 0) { |
| 277 | auto* emulated_controller_p1 = | 278 | auto* emulated_controller_p1 = |
| 278 | hid_core.GetEmulatedController(Core::HID::NpadIdType::Player1); | 279 | hid_core.GetEmulatedController(Core::HID::NpadIdType::Player1); |
| @@ -696,39 +697,38 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i | |||
| 696 | UpdateControllerEnabledButtons(); | 697 | UpdateControllerEnabledButtons(); |
| 697 | UpdateControllerButtonNames(); | 698 | UpdateControllerButtonNames(); |
| 698 | UpdateMotionButtons(); | 699 | UpdateMotionButtons(); |
| 699 | connect(ui->comboControllerType, qOverload<int>(&QComboBox::currentIndexChanged), | 700 | connect(ui->comboControllerType, qOverload<int>(&QComboBox::currentIndexChanged), [this](int) { |
| 700 | [this, player_index](int) { | 701 | UpdateControllerAvailableButtons(); |
| 701 | UpdateControllerAvailableButtons(); | 702 | UpdateControllerEnabledButtons(); |
| 702 | UpdateControllerEnabledButtons(); | 703 | UpdateControllerButtonNames(); |
| 703 | UpdateControllerButtonNames(); | 704 | UpdateMotionButtons(); |
| 704 | UpdateMotionButtons(); | 705 | const Core::HID::NpadStyleIndex type = |
| 705 | const Core::HID::NpadStyleIndex type = | 706 | GetControllerTypeFromIndex(ui->comboControllerType->currentIndex()); |
| 706 | GetControllerTypeFromIndex(ui->comboControllerType->currentIndex()); | 707 | |
| 707 | 708 | if (player_index == 0) { | |
| 708 | if (player_index == 0) { | 709 | auto* emulated_controller_p1 = |
| 709 | auto* emulated_controller_p1 = | 710 | hid_core.GetEmulatedController(Core::HID::NpadIdType::Player1); |
| 710 | hid_core.GetEmulatedController(Core::HID::NpadIdType::Player1); | 711 | auto* emulated_controller_handheld = |
| 711 | auto* emulated_controller_handheld = | 712 | hid_core.GetEmulatedController(Core::HID::NpadIdType::Handheld); |
| 712 | hid_core.GetEmulatedController(Core::HID::NpadIdType::Handheld); | 713 | bool is_connected = emulated_controller->IsConnected(true); |
| 713 | bool is_connected = emulated_controller->IsConnected(true); | 714 | |
| 714 | 715 | emulated_controller_p1->SetNpadStyleIndex(type); | |
| 715 | emulated_controller_p1->SetNpadStyleIndex(type); | 716 | emulated_controller_handheld->SetNpadStyleIndex(type); |
| 716 | emulated_controller_handheld->SetNpadStyleIndex(type); | 717 | if (is_connected) { |
| 717 | if (is_connected) { | 718 | if (type == Core::HID::NpadStyleIndex::Handheld) { |
| 718 | if (type == Core::HID::NpadStyleIndex::Handheld) { | 719 | emulated_controller_p1->Disconnect(); |
| 719 | emulated_controller_p1->Disconnect(); | 720 | emulated_controller_handheld->Connect(true); |
| 720 | emulated_controller_handheld->Connect(true); | 721 | emulated_controller = emulated_controller_handheld; |
| 721 | emulated_controller = emulated_controller_handheld; | 722 | } else { |
| 722 | } else { | 723 | emulated_controller_handheld->Disconnect(); |
| 723 | emulated_controller_handheld->Disconnect(); | 724 | emulated_controller_p1->Connect(true); |
| 724 | emulated_controller_p1->Connect(true); | 725 | emulated_controller = emulated_controller_p1; |
| 725 | emulated_controller = emulated_controller_p1; | ||
| 726 | } | ||
| 727 | } | ||
| 728 | ui->controllerFrame->SetController(emulated_controller); | ||
| 729 | } | 726 | } |
| 730 | emulated_controller->SetNpadStyleIndex(type); | 727 | } |
| 731 | }); | 728 | ui->controllerFrame->SetController(emulated_controller); |
| 729 | } | ||
| 730 | emulated_controller->SetNpadStyleIndex(type); | ||
| 731 | }); | ||
| 732 | 732 | ||
| 733 | connect(ui->comboDevices, qOverload<int>(&QComboBox::activated), this, | 733 | connect(ui->comboDevices, qOverload<int>(&QComboBox::activated), this, |
| 734 | &ConfigureInputPlayer::UpdateMappingWithDefaults); | 734 | &ConfigureInputPlayer::UpdateMappingWithDefaults); |
diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp index 54b3fe150..af8343b2e 100644 --- a/src/yuzu/configuration/configure_per_game.cpp +++ b/src/yuzu/configuration/configure_per_game.cpp | |||
| @@ -35,10 +35,10 @@ | |||
| 35 | #include "yuzu/uisettings.h" | 35 | #include "yuzu/uisettings.h" |
| 36 | #include "yuzu/util/util.h" | 36 | #include "yuzu/util/util.h" |
| 37 | 37 | ||
| 38 | ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id, const std::string& file_name, | 38 | ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::string& file_name, |
| 39 | Core::System& system_) | 39 | Core::System& system_) |
| 40 | : QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()), | 40 | : QDialog(parent), |
| 41 | title_id(title_id), system{system_} { | 41 | ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_}, system{system_} { |
| 42 | const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name)); | 42 | const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name)); |
| 43 | const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename()) | 43 | const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename()) |
| 44 | : fmt::format("{:016X}", title_id); | 44 | : fmt::format("{:016X}", title_id); |
| @@ -116,8 +116,8 @@ void ConfigurePerGame::HandleApplyButtonClicked() { | |||
| 116 | ApplyConfiguration(); | 116 | ApplyConfiguration(); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | void ConfigurePerGame::LoadFromFile(FileSys::VirtualFile file) { | 119 | void ConfigurePerGame::LoadFromFile(FileSys::VirtualFile file_) { |
| 120 | this->file = std::move(file); | 120 | file = std::move(file_); |
| 121 | LoadConfiguration(); | 121 | LoadConfiguration(); |
| 122 | } | 122 | } |
| 123 | 123 | ||
diff --git a/src/yuzu/configuration/configure_per_game.h b/src/yuzu/configuration/configure_per_game.h index e6dc05546..17a98a0f3 100644 --- a/src/yuzu/configuration/configure_per_game.h +++ b/src/yuzu/configuration/configure_per_game.h | |||
| @@ -39,14 +39,14 @@ class ConfigurePerGame : public QDialog { | |||
| 39 | 39 | ||
| 40 | public: | 40 | public: |
| 41 | // Cannot use std::filesystem::path due to https://bugreports.qt.io/browse/QTBUG-73263 | 41 | // Cannot use std::filesystem::path due to https://bugreports.qt.io/browse/QTBUG-73263 |
| 42 | explicit ConfigurePerGame(QWidget* parent, u64 title_id, const std::string& file_name, | 42 | explicit ConfigurePerGame(QWidget* parent, u64 title_id_, const std::string& file_name, |
| 43 | Core::System& system_); | 43 | Core::System& system_); |
| 44 | ~ConfigurePerGame() override; | 44 | ~ConfigurePerGame() override; |
| 45 | 45 | ||
| 46 | /// Save all button configurations to settings file | 46 | /// Save all button configurations to settings file |
| 47 | void ApplyConfiguration(); | 47 | void ApplyConfiguration(); |
| 48 | 48 | ||
| 49 | void LoadFromFile(FileSys::VirtualFile file); | 49 | void LoadFromFile(FileSys::VirtualFile file_); |
| 50 | 50 | ||
| 51 | private: | 51 | private: |
| 52 | void changeEvent(QEvent* event) override; | 52 | void changeEvent(QEvent* event) override; |
diff --git a/src/yuzu/configuration/configure_per_game_addons.cpp b/src/yuzu/configuration/configure_per_game_addons.cpp index 7893a85bb..4906997ab 100644 --- a/src/yuzu/configuration/configure_per_game_addons.cpp +++ b/src/yuzu/configuration/configure_per_game_addons.cpp | |||
| @@ -89,8 +89,8 @@ void ConfigurePerGameAddons::ApplyConfiguration() { | |||
| 89 | Settings::values.disabled_addons[title_id] = disabled_addons; | 89 | Settings::values.disabled_addons[title_id] = disabled_addons; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | void ConfigurePerGameAddons::LoadFromFile(FileSys::VirtualFile file) { | 92 | void ConfigurePerGameAddons::LoadFromFile(FileSys::VirtualFile file_) { |
| 93 | this->file = std::move(file); | 93 | file = std::move(file_); |
| 94 | LoadConfiguration(); | 94 | LoadConfiguration(); |
| 95 | } | 95 | } |
| 96 | 96 | ||
diff --git a/src/yuzu/configuration/configure_per_game_addons.h b/src/yuzu/configuration/configure_per_game_addons.h index 24b017494..14690fba8 100644 --- a/src/yuzu/configuration/configure_per_game_addons.h +++ b/src/yuzu/configuration/configure_per_game_addons.h | |||
| @@ -35,7 +35,7 @@ public: | |||
| 35 | /// Save all button configurations to settings file | 35 | /// Save all button configurations to settings file |
| 36 | void ApplyConfiguration(); | 36 | void ApplyConfiguration(); |
| 37 | 37 | ||
| 38 | void LoadFromFile(FileSys::VirtualFile file); | 38 | void LoadFromFile(FileSys::VirtualFile file_); |
| 39 | 39 | ||
| 40 | void SetTitleId(u64 id); | 40 | void SetTitleId(u64 id); |
| 41 | 41 | ||
diff --git a/src/yuzu/configuration/configure_ringcon.cpp b/src/yuzu/configuration/configure_ringcon.cpp index 4fcc22b7a..688c2dd38 100644 --- a/src/yuzu/configuration/configure_ringcon.cpp +++ b/src/yuzu/configuration/configure_ringcon.cpp | |||
| @@ -165,10 +165,10 @@ ConfigureRingController::ConfigureRingController(QWidget* parent, | |||
| 165 | const std::string invert_str = invert_value ? "+" : "-"; | 165 | const std::string invert_str = invert_value ? "+" : "-"; |
| 166 | param.Set("invert_x", invert_str); | 166 | param.Set("invert_x", invert_str); |
| 167 | emulated_device->SetRingParam(param); | 167 | emulated_device->SetRingParam(param); |
| 168 | for (int sub_button_id = 0; sub_button_id < ANALOG_SUB_BUTTONS_NUM; | 168 | for (int sub_button_id2 = 0; sub_button_id2 < ANALOG_SUB_BUTTONS_NUM; |
| 169 | ++sub_button_id) { | 169 | ++sub_button_id2) { |
| 170 | analog_map_buttons[sub_button_id]->setText( | 170 | analog_map_buttons[sub_button_id2]->setText( |
| 171 | AnalogToText(param, analog_sub_buttons[sub_button_id])); | 171 | AnalogToText(param, analog_sub_buttons[sub_button_id2])); |
| 172 | } | 172 | } |
| 173 | }); | 173 | }); |
| 174 | context_menu.exec( | 174 | context_menu.exec( |
diff --git a/src/yuzu/configuration/configure_touch_from_button.cpp b/src/yuzu/configuration/configure_touch_from_button.cpp index c17da6fd1..06cc452c3 100644 --- a/src/yuzu/configuration/configure_touch_from_button.cpp +++ b/src/yuzu/configuration/configure_touch_from_button.cpp | |||
| @@ -68,10 +68,10 @@ static QString ButtonToText(const Common::ParamPackage& param) { | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | ConfigureTouchFromButton::ConfigureTouchFromButton( | 70 | ConfigureTouchFromButton::ConfigureTouchFromButton( |
| 71 | QWidget* parent, const std::vector<Settings::TouchFromButtonMap>& touch_maps, | 71 | QWidget* parent, const std::vector<Settings::TouchFromButtonMap>& touch_maps_, |
| 72 | InputCommon::InputSubsystem* input_subsystem_, const int default_index) | 72 | InputCommon::InputSubsystem* input_subsystem_, const int default_index) |
| 73 | : QDialog(parent), ui(std::make_unique<Ui::ConfigureTouchFromButton>()), | 73 | : QDialog(parent), ui(std::make_unique<Ui::ConfigureTouchFromButton>()), |
| 74 | touch_maps(touch_maps), input_subsystem{input_subsystem_}, selected_index(default_index), | 74 | touch_maps{touch_maps_}, input_subsystem{input_subsystem_}, selected_index{default_index}, |
| 75 | timeout_timer(std::make_unique<QTimer>()), poll_timer(std::make_unique<QTimer>()) { | 75 | timeout_timer(std::make_unique<QTimer>()), poll_timer(std::make_unique<QTimer>()) { |
| 76 | ui->setupUi(this); | 76 | ui->setupUi(this); |
| 77 | binding_list_model = new QStandardItemModel(0, 3, this); | 77 | binding_list_model = new QStandardItemModel(0, 3, this); |
diff --git a/src/yuzu/configuration/configure_touch_from_button.h b/src/yuzu/configuration/configure_touch_from_button.h index e1400481a..b8c55db66 100644 --- a/src/yuzu/configuration/configure_touch_from_button.h +++ b/src/yuzu/configuration/configure_touch_from_button.h | |||
| @@ -37,7 +37,7 @@ class ConfigureTouchFromButton : public QDialog { | |||
| 37 | 37 | ||
| 38 | public: | 38 | public: |
| 39 | explicit ConfigureTouchFromButton(QWidget* parent, | 39 | explicit ConfigureTouchFromButton(QWidget* parent, |
| 40 | const std::vector<Settings::TouchFromButtonMap>& touch_maps, | 40 | const std::vector<Settings::TouchFromButtonMap>& touch_maps_, |
| 41 | InputCommon::InputSubsystem* input_subsystem_, | 41 | InputCommon::InputSubsystem* input_subsystem_, |
| 42 | int default_index = 0); | 42 | int default_index = 0); |
| 43 | ~ConfigureTouchFromButton() override; | 43 | ~ConfigureTouchFromButton() override; |
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 8f486a131..0ea31cd33 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp | |||
| @@ -113,9 +113,9 @@ QString WaitTreeText::GetText() const { | |||
| 113 | return text; | 113 | return text; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | WaitTreeMutexInfo::WaitTreeMutexInfo(VAddr mutex_address, const Kernel::KHandleTable& handle_table, | 116 | WaitTreeMutexInfo::WaitTreeMutexInfo(VAddr mutex_address_, const Kernel::KHandleTable& handle_table, |
| 117 | Core::System& system_) | 117 | Core::System& system_) |
| 118 | : mutex_address(mutex_address), system{system_} { | 118 | : mutex_address{mutex_address_}, system{system_} { |
| 119 | mutex_value = system.Memory().Read32(mutex_address); | 119 | mutex_value = system.Memory().Read32(mutex_address); |
| 120 | owner_handle = static_cast<Kernel::Handle>(mutex_value & Kernel::Svc::HandleWaitMask); | 120 | owner_handle = static_cast<Kernel::Handle>(mutex_value & Kernel::Svc::HandleWaitMask); |
| 121 | owner = handle_table.GetObject<Kernel::KThread>(owner_handle).GetPointerUnsafe(); | 121 | owner = handle_table.GetObject<Kernel::KThread>(owner_handle).GetPointerUnsafe(); |
| @@ -140,8 +140,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeMutexInfo::GetChildren() cons | |||
| 140 | return list; | 140 | return list; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | WaitTreeCallstack::WaitTreeCallstack(const Kernel::KThread& thread, Core::System& system_) | 143 | WaitTreeCallstack::WaitTreeCallstack(const Kernel::KThread& thread_, Core::System& system_) |
| 144 | : thread(thread), system{system_} {} | 144 | : thread{thread_}, system{system_} {} |
| 145 | WaitTreeCallstack::~WaitTreeCallstack() = default; | 145 | WaitTreeCallstack::~WaitTreeCallstack() = default; |
| 146 | 146 | ||
| 147 | QString WaitTreeCallstack::GetText() const { | 147 | QString WaitTreeCallstack::GetText() const { |
| @@ -171,8 +171,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeCallstack::GetChildren() cons | |||
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | WaitTreeSynchronizationObject::WaitTreeSynchronizationObject( | 173 | WaitTreeSynchronizationObject::WaitTreeSynchronizationObject( |
| 174 | const Kernel::KSynchronizationObject& o, Core::System& system_) | 174 | const Kernel::KSynchronizationObject& object_, Core::System& system_) |
| 175 | : object(o), system{system_} {} | 175 | : object{object_}, system{system_} {} |
| 176 | WaitTreeSynchronizationObject::~WaitTreeSynchronizationObject() = default; | 176 | WaitTreeSynchronizationObject::~WaitTreeSynchronizationObject() = default; |
| 177 | 177 | ||
| 178 | WaitTreeExpandableItem::WaitTreeExpandableItem() = default; | 178 | WaitTreeExpandableItem::WaitTreeExpandableItem() = default; |
| @@ -380,8 +380,8 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const { | |||
| 380 | return list; | 380 | return list; |
| 381 | } | 381 | } |
| 382 | 382 | ||
| 383 | WaitTreeEvent::WaitTreeEvent(const Kernel::KReadableEvent& object, Core::System& system_) | 383 | WaitTreeEvent::WaitTreeEvent(const Kernel::KReadableEvent& object_, Core::System& system_) |
| 384 | : WaitTreeSynchronizationObject(object, system_) {} | 384 | : WaitTreeSynchronizationObject(object_, system_) {} |
| 385 | WaitTreeEvent::~WaitTreeEvent() = default; | 385 | WaitTreeEvent::~WaitTreeEvent() = default; |
| 386 | 386 | ||
| 387 | WaitTreeThreadList::WaitTreeThreadList(std::vector<Kernel::KThread*>&& list, Core::System& system_) | 387 | WaitTreeThreadList::WaitTreeThreadList(std::vector<Kernel::KThread*>&& list, Core::System& system_) |
diff --git a/src/yuzu/debugger/wait_tree.h b/src/yuzu/debugger/wait_tree.h index 4a36dfc48..f21b9f467 100644 --- a/src/yuzu/debugger/wait_tree.h +++ b/src/yuzu/debugger/wait_tree.h | |||
| @@ -78,7 +78,7 @@ public: | |||
| 78 | class WaitTreeMutexInfo : public WaitTreeExpandableItem { | 78 | class WaitTreeMutexInfo : public WaitTreeExpandableItem { |
| 79 | Q_OBJECT | 79 | Q_OBJECT |
| 80 | public: | 80 | public: |
| 81 | explicit WaitTreeMutexInfo(VAddr mutex_address, const Kernel::KHandleTable& handle_table, | 81 | explicit WaitTreeMutexInfo(VAddr mutex_address_, const Kernel::KHandleTable& handle_table, |
| 82 | Core::System& system_); | 82 | Core::System& system_); |
| 83 | ~WaitTreeMutexInfo() override; | 83 | ~WaitTreeMutexInfo() override; |
| 84 | 84 | ||
| @@ -97,7 +97,7 @@ private: | |||
| 97 | class WaitTreeCallstack : public WaitTreeExpandableItem { | 97 | class WaitTreeCallstack : public WaitTreeExpandableItem { |
| 98 | Q_OBJECT | 98 | Q_OBJECT |
| 99 | public: | 99 | public: |
| 100 | explicit WaitTreeCallstack(const Kernel::KThread& thread, Core::System& system_); | 100 | explicit WaitTreeCallstack(const Kernel::KThread& thread_, Core::System& system_); |
| 101 | ~WaitTreeCallstack() override; | 101 | ~WaitTreeCallstack() override; |
| 102 | 102 | ||
| 103 | QString GetText() const override; | 103 | QString GetText() const override; |
| @@ -112,7 +112,7 @@ private: | |||
| 112 | class WaitTreeSynchronizationObject : public WaitTreeExpandableItem { | 112 | class WaitTreeSynchronizationObject : public WaitTreeExpandableItem { |
| 113 | Q_OBJECT | 113 | Q_OBJECT |
| 114 | public: | 114 | public: |
| 115 | explicit WaitTreeSynchronizationObject(const Kernel::KSynchronizationObject& object, | 115 | explicit WaitTreeSynchronizationObject(const Kernel::KSynchronizationObject& object_, |
| 116 | Core::System& system_); | 116 | Core::System& system_); |
| 117 | ~WaitTreeSynchronizationObject() override; | 117 | ~WaitTreeSynchronizationObject() override; |
| 118 | 118 | ||
| @@ -162,7 +162,7 @@ private: | |||
| 162 | class WaitTreeEvent : public WaitTreeSynchronizationObject { | 162 | class WaitTreeEvent : public WaitTreeSynchronizationObject { |
| 163 | Q_OBJECT | 163 | Q_OBJECT |
| 164 | public: | 164 | public: |
| 165 | explicit WaitTreeEvent(const Kernel::KReadableEvent& object, Core::System& system_); | 165 | explicit WaitTreeEvent(const Kernel::KReadableEvent& object_, Core::System& system_); |
| 166 | ~WaitTreeEvent() override; | 166 | ~WaitTreeEvent() override; |
| 167 | }; | 167 | }; |
| 168 | 168 | ||
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 6321afc83..05d309827 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -28,8 +28,8 @@ | |||
| 28 | #include "yuzu/uisettings.h" | 28 | #include "yuzu/uisettings.h" |
| 29 | #include "yuzu/util/controller_navigation.h" | 29 | #include "yuzu/util/controller_navigation.h" |
| 30 | 30 | ||
| 31 | GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist, QObject* parent) | 31 | GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist_, QObject* parent) |
| 32 | : QObject(parent), gamelist{gamelist} {} | 32 | : QObject(parent), gamelist{gamelist_} {} |
| 33 | 33 | ||
| 34 | // EventFilter in order to process systemkeys while editing the searchfield | 34 | // EventFilter in order to process systemkeys while editing the searchfield |
| 35 | bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) { | 35 | bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) { |
| @@ -80,9 +80,9 @@ bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* eve | |||
| 80 | return QObject::eventFilter(obj, event); | 80 | return QObject::eventFilter(obj, event); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | void GameListSearchField::setFilterResult(int visible, int total) { | 83 | void GameListSearchField::setFilterResult(int visible_, int total_) { |
| 84 | this->visible = visible; | 84 | visible = visible_; |
| 85 | this->total = total; | 85 | total = total_; |
| 86 | 86 | ||
| 87 | label_filter_result->setText(tr("%1 of %n result(s)", "", total).arg(visible)); | 87 | label_filter_result->setText(tr("%1 of %n result(s)", "", total).arg(visible)); |
| 88 | } | 88 | } |
| @@ -309,9 +309,9 @@ void GameList::OnFilterCloseClicked() { | |||
| 309 | main_window->filterBarSetChecked(false); | 309 | main_window->filterBarSetChecked(false); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | GameList::GameList(FileSys::VirtualFilesystem vfs, FileSys::ManualContentProvider* provider, | 312 | GameList::GameList(FileSys::VirtualFilesystem vfs_, FileSys::ManualContentProvider* provider_, |
| 313 | Core::System& system_, GMainWindow* parent) | 313 | Core::System& system_, GMainWindow* parent) |
| 314 | : QWidget{parent}, vfs(std::move(vfs)), provider(provider), system{system_} { | 314 | : QWidget{parent}, vfs{std::move(vfs_)}, provider{provider_}, system{system_} { |
| 315 | watcher = new QFileSystemWatcher(this); | 315 | watcher = new QFileSystemWatcher(this); |
| 316 | connect(watcher, &QFileSystemWatcher::directoryChanged, this, &GameList::RefreshGameDirectory); | 316 | connect(watcher, &QFileSystemWatcher::directoryChanged, this, &GameList::RefreshGameDirectory); |
| 317 | 317 | ||
diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h index 464da98ad..bc36d015a 100644 --- a/src/yuzu/game_list.h +++ b/src/yuzu/game_list.h | |||
| @@ -67,8 +67,8 @@ public: | |||
| 67 | COLUMN_COUNT, // Number of columns | 67 | COLUMN_COUNT, // Number of columns |
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | explicit GameList(std::shared_ptr<FileSys::VfsFilesystem> vfs, | 70 | explicit GameList(std::shared_ptr<FileSys::VfsFilesystem> vfs_, |
| 71 | FileSys::ManualContentProvider* provider, Core::System& system_, | 71 | FileSys::ManualContentProvider* provider_, Core::System& system_, |
| 72 | GMainWindow* parent = nullptr); | 72 | GMainWindow* parent = nullptr); |
| 73 | ~GameList() override; | 73 | ~GameList() override; |
| 74 | 74 | ||
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index f2a986ed8..cd7d63536 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h | |||
| @@ -225,8 +225,8 @@ public: | |||
| 225 | static constexpr int GameDirRole = Qt::UserRole + 2; | 225 | static constexpr int GameDirRole = Qt::UserRole + 2; |
| 226 | 226 | ||
| 227 | explicit GameListDir(UISettings::GameDir& directory, | 227 | explicit GameListDir(UISettings::GameDir& directory, |
| 228 | GameListItemType dir_type = GameListItemType::CustomDir) | 228 | GameListItemType dir_type_ = GameListItemType::CustomDir) |
| 229 | : dir_type{dir_type} { | 229 | : dir_type{dir_type_} { |
| 230 | setData(type(), TypeRole); | 230 | setData(type(), TypeRole); |
| 231 | 231 | ||
| 232 | UISettings::GameDir* game_dir = &directory; | 232 | UISettings::GameDir* game_dir = &directory; |
| @@ -348,7 +348,7 @@ public: | |||
| 348 | explicit GameListSearchField(GameList* parent = nullptr); | 348 | explicit GameListSearchField(GameList* parent = nullptr); |
| 349 | 349 | ||
| 350 | QString filterText() const; | 350 | QString filterText() const; |
| 351 | void setFilterResult(int visible, int total); | 351 | void setFilterResult(int visible_, int total_); |
| 352 | 352 | ||
| 353 | void clear(); | 353 | void clear(); |
| 354 | void setFocus(); | 354 | void setFocus(); |
| @@ -356,7 +356,7 @@ public: | |||
| 356 | private: | 356 | private: |
| 357 | class KeyReleaseEater : public QObject { | 357 | class KeyReleaseEater : public QObject { |
| 358 | public: | 358 | public: |
| 359 | explicit KeyReleaseEater(GameList* gamelist, QObject* parent = nullptr); | 359 | explicit KeyReleaseEater(GameList* gamelist_, QObject* parent = nullptr); |
| 360 | 360 | ||
| 361 | private: | 361 | private: |
| 362 | GameList* gamelist = nullptr; | 362 | GameList* gamelist = nullptr; |
diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index ca1899b5c..63326968b 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp | |||
| @@ -223,12 +223,12 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::stri | |||
| 223 | } | 223 | } |
| 224 | } // Anonymous namespace | 224 | } // Anonymous namespace |
| 225 | 225 | ||
| 226 | GameListWorker::GameListWorker(FileSys::VirtualFilesystem vfs, | 226 | GameListWorker::GameListWorker(FileSys::VirtualFilesystem vfs_, |
| 227 | FileSys::ManualContentProvider* provider, | 227 | FileSys::ManualContentProvider* provider_, |
| 228 | QVector<UISettings::GameDir>& game_dirs, | 228 | QVector<UISettings::GameDir>& game_dirs_, |
| 229 | const CompatibilityList& compatibility_list, Core::System& system_) | 229 | const CompatibilityList& compatibility_list_, Core::System& system_) |
| 230 | : vfs(std::move(vfs)), provider(provider), game_dirs(game_dirs), | 230 | : vfs{std::move(vfs_)}, provider{provider_}, game_dirs{game_dirs_}, |
| 231 | compatibility_list(compatibility_list), system{system_} {} | 231 | compatibility_list{compatibility_list_}, system{system_} {} |
| 232 | 232 | ||
| 233 | GameListWorker::~GameListWorker() = default; | 233 | GameListWorker::~GameListWorker() = default; |
| 234 | 234 | ||
diff --git a/src/yuzu/game_list_worker.h b/src/yuzu/game_list_worker.h index 622d241fb..24a4e92c3 100644 --- a/src/yuzu/game_list_worker.h +++ b/src/yuzu/game_list_worker.h | |||
| @@ -33,10 +33,10 @@ class GameListWorker : public QObject, public QRunnable { | |||
| 33 | Q_OBJECT | 33 | Q_OBJECT |
| 34 | 34 | ||
| 35 | public: | 35 | public: |
| 36 | explicit GameListWorker(std::shared_ptr<FileSys::VfsFilesystem> vfs, | 36 | explicit GameListWorker(std::shared_ptr<FileSys::VfsFilesystem> vfs_, |
| 37 | FileSys::ManualContentProvider* provider, | 37 | FileSys::ManualContentProvider* provider_, |
| 38 | QVector<UISettings::GameDir>& game_dirs, | 38 | QVector<UISettings::GameDir>& game_dirs_, |
| 39 | const CompatibilityList& compatibility_list, Core::System& system_); | 39 | const CompatibilityList& compatibility_list_, Core::System& system_); |
| 40 | ~GameListWorker() override; | 40 | ~GameListWorker() override; |
| 41 | 41 | ||
| 42 | /// Starts the processing of directory tree information. | 42 | /// Starts the processing of directory tree information. |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 33886e50e..b460020b1 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -934,8 +934,7 @@ void GMainWindow::InitializeWidgets() { | |||
| 934 | Settings::values.renderer_backend.SetValue(Settings::RendererBackend::Vulkan); | 934 | Settings::values.renderer_backend.SetValue(Settings::RendererBackend::Vulkan); |
| 935 | } else { | 935 | } else { |
| 936 | Settings::values.renderer_backend.SetValue(Settings::RendererBackend::OpenGL); | 936 | Settings::values.renderer_backend.SetValue(Settings::RendererBackend::OpenGL); |
| 937 | const auto filter = Settings::values.scaling_filter.GetValue(); | 937 | if (Settings::values.scaling_filter.GetValue() == Settings::ScalingFilter::Fsr) { |
| 938 | if (filter == Settings::ScalingFilter::Fsr) { | ||
| 939 | Settings::values.scaling_filter.SetValue(Settings::ScalingFilter::NearestNeighbor); | 938 | Settings::values.scaling_filter.SetValue(Settings::ScalingFilter::NearestNeighbor); |
| 940 | UpdateFilterText(); | 939 | UpdateFilterText(); |
| 941 | } | 940 | } |
| @@ -1442,7 +1441,7 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p | |||
| 1442 | } | 1441 | } |
| 1443 | return false; | 1442 | return false; |
| 1444 | } | 1443 | } |
| 1445 | game_path = filename; | 1444 | current_game_path = filename; |
| 1446 | 1445 | ||
| 1447 | system->TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend", "Qt"); | 1446 | system->TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend", "Qt"); |
| 1448 | return true; | 1447 | return true; |
| @@ -1508,7 +1507,7 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t | |||
| 1508 | 1507 | ||
| 1509 | // Register an ExecuteProgram callback such that Core can execute a sub-program | 1508 | // Register an ExecuteProgram callback such that Core can execute a sub-program |
| 1510 | system->RegisterExecuteProgramCallback( | 1509 | system->RegisterExecuteProgramCallback( |
| 1511 | [this](std::size_t program_index) { render_window->ExecuteProgram(program_index); }); | 1510 | [this](std::size_t program_index_) { render_window->ExecuteProgram(program_index_); }); |
| 1512 | 1511 | ||
| 1513 | // Register an Exit callback such that Core can exit the currently running application. | 1512 | // Register an Exit callback such that Core can exit the currently running application. |
| 1514 | system->RegisterExitCallback([this]() { render_window->Exit(); }); | 1513 | system->RegisterExitCallback([this]() { render_window->Exit(); }); |
| @@ -1641,7 +1640,7 @@ void GMainWindow::ShutdownGame() { | |||
| 1641 | emu_frametime_label->setVisible(false); | 1640 | emu_frametime_label->setVisible(false); |
| 1642 | renderer_status_button->setEnabled(!UISettings::values.has_broken_vulkan); | 1641 | renderer_status_button->setEnabled(!UISettings::values.has_broken_vulkan); |
| 1643 | 1642 | ||
| 1644 | game_path.clear(); | 1643 | current_game_path.clear(); |
| 1645 | 1644 | ||
| 1646 | // When closing the game, destroy the GLWindow to clear the context after the game is closed | 1645 | // When closing the game, destroy the GLWindow to clear the context after the game is closed |
| 1647 | render_window->ReleaseRenderTarget(); | 1646 | render_window->ReleaseRenderTarget(); |
| @@ -2560,7 +2559,7 @@ void GMainWindow::OnRestartGame() { | |||
| 2560 | return; | 2559 | return; |
| 2561 | } | 2560 | } |
| 2562 | // Make a copy since BootGame edits game_path | 2561 | // Make a copy since BootGame edits game_path |
| 2563 | BootGame(QString(game_path)); | 2562 | BootGame(QString(current_game_path)); |
| 2564 | } | 2563 | } |
| 2565 | 2564 | ||
| 2566 | void GMainWindow::OnPauseGame() { | 2565 | void GMainWindow::OnPauseGame() { |
| @@ -2989,7 +2988,7 @@ void GMainWindow::OnToggleAdaptingFilter() { | |||
| 2989 | 2988 | ||
| 2990 | void GMainWindow::OnConfigurePerGame() { | 2989 | void GMainWindow::OnConfigurePerGame() { |
| 2991 | const u64 title_id = system->GetCurrentProcessProgramID(); | 2990 | const u64 title_id = system->GetCurrentProcessProgramID(); |
| 2992 | OpenPerGameConfiguration(title_id, game_path.toStdString()); | 2991 | OpenPerGameConfiguration(title_id, current_game_path.toStdString()); |
| 2993 | } | 2992 | } |
| 2994 | 2993 | ||
| 2995 | void GMainWindow::OpenPerGameConfiguration(u64 title_id, const std::string& file_name) { | 2994 | void GMainWindow::OpenPerGameConfiguration(u64 title_id, const std::string& file_name) { |
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 600647015..8cf224c9c 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -369,7 +369,7 @@ private: | |||
| 369 | bool emulation_running = false; | 369 | bool emulation_running = false; |
| 370 | std::unique_ptr<EmuThread> emu_thread; | 370 | std::unique_ptr<EmuThread> emu_thread; |
| 371 | // The path to the game currently running | 371 | // The path to the game currently running |
| 372 | QString game_path; | 372 | QString current_game_path; |
| 373 | 373 | ||
| 374 | bool auto_paused = false; | 374 | bool auto_paused = false; |
| 375 | bool auto_muted = false; | 375 | bool auto_muted = false; |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.h b/src/yuzu_cmd/emu_window/emu_window_sdl2.h index 9746585f5..58b885465 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.h | |||
| @@ -20,7 +20,7 @@ enum class MouseButton; | |||
| 20 | 20 | ||
| 21 | class EmuWindow_SDL2 : public Core::Frontend::EmuWindow { | 21 | class EmuWindow_SDL2 : public Core::Frontend::EmuWindow { |
| 22 | public: | 22 | public: |
| 23 | explicit EmuWindow_SDL2(InputCommon::InputSubsystem* input_subsystem, Core::System& system_); | 23 | explicit EmuWindow_SDL2(InputCommon::InputSubsystem* input_subsystem_, Core::System& system_); |
| 24 | ~EmuWindow_SDL2(); | 24 | ~EmuWindow_SDL2(); |
| 25 | 25 | ||
| 26 | /// Whether the window is still open, and a close request hasn't yet been sent | 26 | /// Whether the window is still open, and a close request hasn't yet been sent |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index 8075c9082..9b660c13c 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | |||
| @@ -73,9 +73,9 @@ bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() { | |||
| 73 | return unsupported_ext.empty(); | 73 | return unsupported_ext.empty(); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsystem, | 76 | EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsystem_, |
| 77 | Core::System& system_, bool fullscreen) | 77 | Core::System& system_, bool fullscreen) |
| 78 | : EmuWindow_SDL2{input_subsystem, system_} { | 78 | : EmuWindow_SDL2{input_subsystem_, system_} { |
| 79 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); | 79 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); |
| 80 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6); | 80 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6); |
| 81 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY); | 81 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY); |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h index d159166fd..39346e704 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.h | |||
| @@ -17,7 +17,7 @@ class InputSubsystem; | |||
| 17 | 17 | ||
| 18 | class EmuWindow_SDL2_GL final : public EmuWindow_SDL2 { | 18 | class EmuWindow_SDL2_GL final : public EmuWindow_SDL2 { |
| 19 | public: | 19 | public: |
| 20 | explicit EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsystem, Core::System& system_, | 20 | explicit EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsystem_, Core::System& system_, |
| 21 | bool fullscreen); | 21 | bool fullscreen); |
| 22 | ~EmuWindow_SDL2_GL(); | 22 | ~EmuWindow_SDL2_GL(); |
| 23 | 23 | ||
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp index d5fe35aa0..65455c86e 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | |||
| @@ -21,9 +21,9 @@ | |||
| 21 | #include <SDL.h> | 21 | #include <SDL.h> |
| 22 | #include <SDL_syswm.h> | 22 | #include <SDL_syswm.h> |
| 23 | 23 | ||
| 24 | EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem, | 24 | EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem_, |
| 25 | Core::System& system_, bool fullscreen) | 25 | Core::System& system_, bool fullscreen) |
| 26 | : EmuWindow_SDL2{input_subsystem, system_} { | 26 | : EmuWindow_SDL2{input_subsystem_, system_} { |
| 27 | const std::string window_title = fmt::format("yuzu {} | {}-{} (Vulkan)", Common::g_build_name, | 27 | const std::string window_title = fmt::format("yuzu {} | {}-{} (Vulkan)", Common::g_build_name, |
| 28 | Common::g_scm_branch, Common::g_scm_desc); | 28 | Common::g_scm_branch, Common::g_scm_desc); |
| 29 | render_window = | 29 | render_window = |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h index d92e3aaab..e39ad754d 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.h | |||
| @@ -18,7 +18,7 @@ class InputSubsystem; | |||
| 18 | 18 | ||
| 19 | class EmuWindow_SDL2_VK final : public EmuWindow_SDL2 { | 19 | class EmuWindow_SDL2_VK final : public EmuWindow_SDL2 { |
| 20 | public: | 20 | public: |
| 21 | explicit EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem, Core::System& system, | 21 | explicit EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem_, Core::System& system, |
| 22 | bool fullscreen); | 22 | bool fullscreen); |
| 23 | ~EmuWindow_SDL2_VK() override; | 23 | ~EmuWindow_SDL2_VK() override; |
| 24 | 24 | ||