diff options
Diffstat (limited to 'src/yuzu')
-rw-r--r-- | src/yuzu/applets/qt_web_browser.h | 2 | ||||
-rw-r--r-- | src/yuzu/compatdb.cpp | 6 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_audio.cpp | 15 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_audio.ui | 45 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_general.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_general.ui | 7 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_hotkeys.h | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_input_player.h | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_input_player_widget.h | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_system.cpp | 30 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_system.h | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_system.ui | 61 | ||||
-rw-r--r-- | src/yuzu/debugger/wait_tree.cpp | 72 | ||||
-rw-r--r-- | src/yuzu/debugger/wait_tree.h | 36 | ||||
-rw-r--r-- | src/yuzu/loading_screen.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 4 | ||||
-rw-r--r-- | src/yuzu/multiplayer/lobby.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/multiplayer/state.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/multiplayer/state.h | 4 | ||||
-rw-r--r-- | src/yuzu/startup_checks.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/util/overlay_dialog.h | 2 |
21 files changed, 82 insertions, 220 deletions
diff --git a/src/yuzu/applets/qt_web_browser.h b/src/yuzu/applets/qt_web_browser.h index e8fe511ed..ceae7926e 100644 --- a/src/yuzu/applets/qt_web_browser.h +++ b/src/yuzu/applets/qt_web_browser.h @@ -110,7 +110,7 @@ private: /** * Handles button presses to execute functions assigned in yuzu_key_callbacks. * yuzu_key_callbacks contains specialized functions for the buttons in the window footer - * that can be overriden by games to achieve desired functionality. + * that can be overridden by games to achieve desired functionality. * * @tparam HIDButton The list of buttons contained in yuzu_key_callbacks */ diff --git a/src/yuzu/compatdb.cpp b/src/yuzu/compatdb.cpp index 05f49c0d2..a57a96a38 100644 --- a/src/yuzu/compatdb.cpp +++ b/src/yuzu/compatdb.cpp @@ -76,7 +76,7 @@ void CompatDB::Submit() { compatibility_Graphical->addButton(ui->radioButton_Audio_Minor, 1); compatibility_Audio->addButton(ui->radioButton_Audio_No, 2); - const int compatiblity = static_cast<int>(CalculateCompatibility()); + const int compatibility = static_cast<int>(CalculateCompatibility()); switch ((static_cast<CompatDBPage>(currentId()))) { case CompatDBPage::Intro: @@ -113,9 +113,9 @@ void CompatDB::Submit() { break; case CompatDBPage::Final: back(); - LOG_INFO(Frontend, "Compatibility Rating: {}", compatiblity); + LOG_INFO(Frontend, "Compatibility Rating: {}", compatibility); telemetry_session.AddField(Common::Telemetry::FieldType::UserFeedback, "Compatibility", - compatiblity); + compatibility); button(NextButton)->setEnabled(false); button(NextButton)->setText(tr("Submitting")); diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp index 70cc6f84b..fcd6d61a0 100644 --- a/src/yuzu/configuration/configure_audio.cpp +++ b/src/yuzu/configuration/configure_audio.cpp @@ -10,6 +10,7 @@ #include "ui_configure_audio.h" #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/configure_audio.h" +#include "yuzu/uisettings.h" ConfigureAudio::ConfigureAudio(const Core::System& system_, QWidget* parent) : QWidget(parent), ui(std::make_unique<Ui::ConfigureAudio>()), system{system_} { @@ -47,6 +48,7 @@ void ConfigureAudio::SetConfiguration() { const auto volume_value = static_cast<int>(Settings::values.volume.GetValue()); ui->volume_slider->setValue(volume_value); + ui->toggle_background_mute->setChecked(UISettings::values.mute_when_in_background.GetValue()); if (!Settings::IsConfiguringGlobal()) { if (Settings::values.volume.UsingGlobal()) { @@ -56,8 +58,13 @@ void ConfigureAudio::SetConfiguration() { ui->volume_combo_box->setCurrentIndex(1); ui->volume_slider->setEnabled(true); } + ConfigurationShared::SetPerGameSetting(ui->combo_sound, &Settings::values.sound_index); + ConfigurationShared::SetHighlight(ui->mode_label, + !Settings::values.sound_index.UsingGlobal()); ConfigurationShared::SetHighlight(ui->volume_layout, !Settings::values.volume.UsingGlobal()); + } else { + ui->combo_sound->setCurrentIndex(Settings::values.sound_index.GetValue()); } SetVolumeIndicatorText(ui->volume_slider->sliderPosition()); } @@ -109,6 +116,8 @@ void ConfigureAudio::SetVolumeIndicatorText(int percentage) { } void ConfigureAudio::ApplyConfiguration() { + ConfigurationShared::ApplyPerGameSetting(&Settings::values.sound_index, ui->combo_sound); + if (Settings::IsConfiguringGlobal()) { Settings::values.sink_id = ui->sink_combo_box->itemText(ui->sink_combo_box->currentIndex()).toStdString(); @@ -116,6 +125,7 @@ void ConfigureAudio::ApplyConfiguration() { ui->output_combo_box->itemText(ui->output_combo_box->currentIndex()).toStdString()); Settings::values.audio_input_device_id.SetValue( ui->input_combo_box->itemText(ui->input_combo_box->currentIndex()).toStdString()); + UISettings::values.mute_when_in_background = ui->toggle_background_mute->isChecked(); // Guard if during game and set to game-specific value if (Settings::values.volume.UsingGlobal()) { @@ -173,11 +183,14 @@ void ConfigureAudio::RetranslateUI() { void ConfigureAudio::SetupPerGameUI() { if (Settings::IsConfiguringGlobal()) { + ui->combo_sound->setEnabled(Settings::values.sound_index.UsingGlobal()); ui->volume_slider->setEnabled(Settings::values.volume.UsingGlobal()); - return; } + ConfigurationShared::SetColoredComboBox(ui->combo_sound, ui->mode_label, + Settings::values.sound_index.GetValue(true)); + connect(ui->volume_combo_box, qOverload<int>(&QComboBox::activated), this, [this](int index) { ui->volume_slider->setEnabled(index == 1); ConfigurationShared::SetHighlight(ui->volume_layout, index == 1); diff --git a/src/yuzu/configuration/configure_audio.ui b/src/yuzu/configuration/configure_audio.ui index 6034d8581..4128c83ad 100644 --- a/src/yuzu/configuration/configure_audio.ui +++ b/src/yuzu/configuration/configure_audio.ui @@ -39,7 +39,7 @@ <item> <widget class="QLabel" name="output_label"> <property name="text"> - <string>Output Device</string> + <string>Output Device:</string> </property> </widget> </item> @@ -53,7 +53,7 @@ <item> <widget class="QLabel" name="input_label"> <property name="text"> - <string>Input Device</string> + <string>Input Device:</string> </property> </widget> </item> @@ -62,6 +62,36 @@ </item> </layout> </item> + <item> + <layout class="QHBoxLayout" name="mode_layout"> + <item> + <widget class="QLabel" name="mode_label"> + <property name="text"> + <string>Sound Output Mode:</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="combo_sound"> + <item> + <property name="text"> + <string>Mono</string> + </property> + </item> + <item> + <property name="text"> + <string>Stereo</string> + </property> + </item> + <item> + <property name="text"> + <string>Surround</string> + </property> + </item> + </widget> + </item> + </layout> + </item> <item> <widget class="QWidget" name="volume_layout" native="true"> <layout class="QHBoxLayout" name="horizontalLayout_2"> @@ -149,6 +179,17 @@ </layout> </widget> </item> + <item> + <layout class="QHBoxLayout" name="mute_layout"> + <item> + <widget class="QCheckBox" name="toggle_background_mute"> + <property name="text"> + <string>Mute audio when in background</string> + </property> + </widget> + </item> + </layout> + </item> </layout> </widget> </item> diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index 7ade01ba6..207bcdc4d 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -42,7 +42,6 @@ void ConfigureGeneral::SetConfiguration() { ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing.GetValue()); ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot.GetValue()); ui->toggle_background_pause->setChecked(UISettings::values.pause_when_in_background.GetValue()); - ui->toggle_background_mute->setChecked(UISettings::values.mute_when_in_background.GetValue()); ui->toggle_hide_mouse->setChecked(UISettings::values.hide_mouse.GetValue()); ui->toggle_speed_limit->setChecked(Settings::values.use_speed_limit.GetValue()); @@ -88,7 +87,6 @@ void ConfigureGeneral::ApplyConfiguration() { UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked(); UISettings::values.pause_when_in_background = ui->toggle_background_pause->isChecked(); - UISettings::values.mute_when_in_background = ui->toggle_background_mute->isChecked(); UISettings::values.hide_mouse = ui->toggle_hide_mouse->isChecked(); // Guard if during game and set to game-specific value diff --git a/src/yuzu/configuration/configure_general.ui b/src/yuzu/configuration/configure_general.ui index 5b90b1109..6cd79673c 100644 --- a/src/yuzu/configuration/configure_general.ui +++ b/src/yuzu/configuration/configure_general.ui @@ -90,13 +90,6 @@ </widget> </item> <item> - <widget class="QCheckBox" name="toggle_background_mute"> - <property name="text"> - <string>Mute audio when in background</string> - </property> - </widget> - </item> - <item> <widget class="QCheckBox" name="toggle_hide_mouse"> <property name="text"> <string>Hide mouse on inactivity</string> diff --git a/src/yuzu/configuration/configure_hotkeys.h b/src/yuzu/configuration/configure_hotkeys.h index b45ecb185..e8e414320 100644 --- a/src/yuzu/configuration/configure_hotkeys.h +++ b/src/yuzu/configuration/configure_hotkeys.h @@ -34,7 +34,7 @@ public: /** * Populates the hotkey list widget using data from the provided registry. - * Called everytime the Configure dialog is opened. + * Called every time the Configure dialog is opened. * @param registry The HotkeyRegistry whose data is used to populate the list. */ void Populate(const HotkeyRegistry& registry); diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h index 99a9c875d..d4df43d73 100644 --- a/src/yuzu/configuration/configure_input_player.h +++ b/src/yuzu/configuration/configure_input_player.h @@ -224,7 +224,7 @@ private: /// Bottom row is where console wide settings are held, and its "owned" by the parent /// ConfigureInput widget. On show, add this widget to the main layout. This will change the - /// parent of the widget to this widget (but thats fine). + /// parent of the widget to this widget (but that's fine). QWidget* bottom_row; Core::HID::HIDCore& hid_core; diff --git a/src/yuzu/configuration/configure_input_player_widget.h b/src/yuzu/configuration/configure_input_player_widget.h index 0e9e95e85..267d134de 100644 --- a/src/yuzu/configuration/configure_input_player_widget.h +++ b/src/yuzu/configuration/configure_input_player_widget.h @@ -43,7 +43,7 @@ public: // Handles emulated controller events void ControllerUpdate(Core::HID::ControllerTriggerType type); - // Updates input on sheduled interval + // Updates input on scheduled interval void UpdateInput(); protected: diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 9ea4c02da..6af34f793 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp @@ -40,8 +40,6 @@ static bool IsValidLocale(u32 region_index, u32 language_index) { ConfigureSystem::ConfigureSystem(Core::System& system_, QWidget* parent) : QWidget(parent), ui{std::make_unique<Ui::ConfigureSystem>()}, system{system_} { ui->setupUi(this); - connect(ui->button_regenerate_console_id, &QPushButton::clicked, this, - &ConfigureSystem::RefreshConsoleID); connect(ui->rng_seed_checkbox, &QCheckBox::stateChanged, this, [this](int state) { ui->rng_seed_edit->setEnabled(state == Qt::Checked); @@ -76,9 +74,6 @@ ConfigureSystem::ConfigureSystem(Core::System& system_, QWidget* parent) locale_check); connect(ui->combo_region, qOverload<int>(&QComboBox::currentIndexChanged), this, locale_check); - ui->label_console_id->setVisible(Settings::IsConfiguringGlobal()); - ui->button_regenerate_console_id->setVisible(Settings::IsConfiguringGlobal()); - SetupPerGameUI(); SetConfiguration(); @@ -121,14 +116,12 @@ void ConfigureSystem::SetConfiguration() { ui->combo_language->setCurrentIndex(Settings::values.language_index.GetValue()); ui->combo_region->setCurrentIndex(Settings::values.region_index.GetValue()); ui->combo_time_zone->setCurrentIndex(Settings::values.time_zone_index.GetValue()); - ui->combo_sound->setCurrentIndex(Settings::values.sound_index.GetValue()); } else { ConfigurationShared::SetPerGameSetting(ui->combo_language, &Settings::values.language_index); ConfigurationShared::SetPerGameSetting(ui->combo_region, &Settings::values.region_index); ConfigurationShared::SetPerGameSetting(ui->combo_time_zone, &Settings::values.time_zone_index); - ConfigurationShared::SetPerGameSetting(ui->combo_sound, &Settings::values.sound_index); ConfigurationShared::SetHighlight(ui->label_language, !Settings::values.language_index.UsingGlobal()); @@ -136,8 +129,6 @@ void ConfigureSystem::SetConfiguration() { !Settings::values.region_index.UsingGlobal()); ConfigurationShared::SetHighlight(ui->label_timezone, !Settings::values.time_zone_index.UsingGlobal()); - ConfigurationShared::SetHighlight(ui->label_sound, - !Settings::values.sound_index.UsingGlobal()); } } @@ -169,7 +160,6 @@ void ConfigureSystem::ApplyConfiguration() { ConfigurationShared::ApplyPerGameSetting(&Settings::values.region_index, ui->combo_region); ConfigurationShared::ApplyPerGameSetting(&Settings::values.time_zone_index, ui->combo_time_zone); - ConfigurationShared::ApplyPerGameSetting(&Settings::values.sound_index, ui->combo_sound); if (Settings::IsConfiguringGlobal()) { // Guard if during game and set to game-specific value @@ -202,29 +192,11 @@ void ConfigureSystem::ApplyConfiguration() { } } -void ConfigureSystem::RefreshConsoleID() { - QMessageBox::StandardButton reply; - QString warning_text = tr("This will replace your current virtual Switch with a new one. " - "Your current virtual Switch will not be recoverable. " - "This might have unexpected effects in games. This might fail, " - "if you use an outdated config savegame. Continue?"); - reply = QMessageBox::critical(this, tr("Warning"), warning_text, - QMessageBox::No | QMessageBox::Yes); - if (reply == QMessageBox::No) { - return; - } - - u64 console_id{}; - ui->label_console_id->setText( - tr("Console ID: 0x%1").arg(QString::number(console_id, 16).toUpper())); -} - void ConfigureSystem::SetupPerGameUI() { if (Settings::IsConfiguringGlobal()) { ui->combo_language->setEnabled(Settings::values.language_index.UsingGlobal()); ui->combo_region->setEnabled(Settings::values.region_index.UsingGlobal()); ui->combo_time_zone->setEnabled(Settings::values.time_zone_index.UsingGlobal()); - ui->combo_sound->setEnabled(Settings::values.sound_index.UsingGlobal()); ui->rng_seed_checkbox->setEnabled(Settings::values.rng_seed.UsingGlobal()); ui->rng_seed_edit->setEnabled(Settings::values.rng_seed.UsingGlobal()); @@ -237,8 +209,6 @@ void ConfigureSystem::SetupPerGameUI() { Settings::values.region_index.GetValue(true)); ConfigurationShared::SetColoredComboBox(ui->combo_time_zone, ui->label_timezone, Settings::values.time_zone_index.GetValue(true)); - ConfigurationShared::SetColoredComboBox(ui->combo_sound, ui->label_sound, - Settings::values.sound_index.GetValue(true)); ConfigurationShared::SetColoredTristate( ui->rng_seed_checkbox, Settings::values.rng_seed.UsingGlobal(), diff --git a/src/yuzu/configuration/configure_system.h b/src/yuzu/configuration/configure_system.h index a7f086258..ec28724a1 100644 --- a/src/yuzu/configuration/configure_system.h +++ b/src/yuzu/configuration/configure_system.h @@ -35,8 +35,6 @@ private: void ReadSystemSettings(); - void RefreshConsoleID(); - void SetupPerGameUI(); std::unique_ptr<Ui::ConfigureSystem> ui; diff --git a/src/yuzu/configuration/configure_system.ui b/src/yuzu/configuration/configure_system.ui index 0459cd924..9e7bc3b93 100644 --- a/src/yuzu/configuration/configure_system.ui +++ b/src/yuzu/configuration/configure_system.ui @@ -411,7 +411,7 @@ </item> </widget> </item> - <item row="5" column="0"> + <item row="4" column="0"> <widget class="QCheckBox" name="custom_rtc_checkbox"> <property name="text"> <string>Custom RTC</string> @@ -425,54 +425,21 @@ </property> </widget> </item> - <item row="6" column="0"> + <item row="5" column="0"> <widget class="QCheckBox" name="rng_seed_checkbox"> <property name="text"> <string>RNG Seed</string> </property> </widget> </item> - <item row="7" column="0"> + <item row="6" column="0"> <widget class="QLabel" name="device_name_label"> <property name="text"> <string>Device Name</string> </property> </widget> </item> - <item row="3" column="1"> - <widget class="QComboBox" name="combo_sound"> - <item> - <property name="text"> - <string>Mono</string> - </property> - </item> - <item> - <property name="text"> - <string>Stereo</string> - </property> - </item> - <item> - <property name="text"> - <string>Surround</string> - </property> - </item> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="label_console_id"> - <property name="text"> - <string>Console ID:</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_sound"> - <property name="text"> - <string>Sound output mode</string> - </property> - </widget> - </item> - <item row="5" column="1"> + <item row="4" column="1"> <widget class="QDateTimeEdit" name="custom_rtc_edit"> <property name="minimumDate"> <date> @@ -483,14 +450,14 @@ </property> </widget> </item> - <item row="7" column="1"> + <item row="6" column="1"> <widget class="QLineEdit" name="device_name_edit"> <property name="maxLength"> <number>128</number> </property> </widget> </item> - <item row="6" column="1"> + <item row="5" column="1"> <widget class="QLineEdit" name="rng_seed_edit"> <property name="sizePolicy"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> @@ -511,22 +478,6 @@ </property> </widget> </item> - <item row="4" column="1"> - <widget class="QPushButton" name="button_regenerate_console_id"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="layoutDirection"> - <enum>Qt::RightToLeft</enum> - </property> - <property name="text"> - <string>Regenerate</string> - </property> - </widget> - </item> </layout> </item> </layout> diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 7f7c5fc42..0783a2430 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp @@ -112,33 +112,6 @@ QString WaitTreeText::GetText() const { return text; } -WaitTreeMutexInfo::WaitTreeMutexInfo(VAddr mutex_address_, const Kernel::KHandleTable& handle_table, - Core::System& system_) - : mutex_address{mutex_address_}, system{system_} { - mutex_value = system.Memory().Read32(mutex_address); - owner_handle = static_cast<Kernel::Handle>(mutex_value & Kernel::Svc::HandleWaitMask); - owner = handle_table.GetObject<Kernel::KThread>(owner_handle).GetPointerUnsafe(); -} - -WaitTreeMutexInfo::~WaitTreeMutexInfo() = default; - -QString WaitTreeMutexInfo::GetText() const { - return tr("waiting for mutex 0x%1").arg(mutex_address, 16, 16, QLatin1Char{'0'}); -} - -std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeMutexInfo::GetChildren() const { - const bool has_waiters = (mutex_value & Kernel::Svc::HandleWaitMask) != 0; - - std::vector<std::unique_ptr<WaitTreeItem>> list; - list.push_back(std::make_unique<WaitTreeText>(tr("has waiters: %1").arg(has_waiters))); - list.push_back(std::make_unique<WaitTreeText>( - tr("owner handle: 0x%1").arg(owner_handle, 8, 16, QLatin1Char{'0'}))); - if (owner != nullptr) { - list.push_back(std::make_unique<WaitTreeThread>(*owner, system)); - } - return list; -} - WaitTreeCallstack::WaitTreeCallstack(const Kernel::KThread& thread_, Core::System& system_) : thread{thread_}, system{system_} {} WaitTreeCallstack::~WaitTreeCallstack() = default; @@ -182,10 +155,9 @@ bool WaitTreeExpandableItem::IsExpandable() const { } QString WaitTreeSynchronizationObject::GetText() const { - return tr("[%1] %2 %3") + return tr("[%1] %2") .arg(object.GetId()) - .arg(QString::fromStdString(object.GetTypeObj().GetName()), - QString::fromStdString(object.GetName())); + .arg(QString::fromStdString(object.GetTypeObj().GetName())); } std::unique_ptr<WaitTreeSynchronizationObject> WaitTreeSynchronizationObject::make( @@ -217,26 +189,6 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeSynchronizationObject::GetChi return list; } -WaitTreeObjectList::WaitTreeObjectList(const std::vector<Kernel::KSynchronizationObject*>& list, - bool w_all, Core::System& system_) - : object_list(list), wait_all(w_all), system{system_} {} - -WaitTreeObjectList::~WaitTreeObjectList() = default; - -QString WaitTreeObjectList::GetText() const { - if (wait_all) - return tr("waiting for all objects"); - return tr("waiting for one of the following objects"); -} - -std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeObjectList::GetChildren() const { - std::vector<std::unique_ptr<WaitTreeItem>> list(object_list.size()); - std::transform(object_list.begin(), object_list.end(), list.begin(), [this](const auto& t) { - return WaitTreeSynchronizationObject::make(*t, system); - }); - return list; -} - WaitTreeThread::WaitTreeThread(const Kernel::KThread& thread, Core::System& system_) : WaitTreeSynchronizationObject(thread, system_), system{system_} {} WaitTreeThread::~WaitTreeThread() = default; @@ -348,32 +300,14 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const { list.push_back(std::make_unique<WaitTreeText>(tr("processor = %1").arg(processor))); list.push_back(std::make_unique<WaitTreeText>( - tr("ideal core = %1").arg(thread.GetIdealCoreForDebugging()))); - list.push_back(std::make_unique<WaitTreeText>( tr("affinity mask = %1").arg(thread.GetAffinityMask().GetAffinityMask()))); - list.push_back(std::make_unique<WaitTreeText>(tr("thread id = %1").arg(thread.GetThreadID()))); + list.push_back(std::make_unique<WaitTreeText>(tr("thread id = %1").arg(thread.GetThreadId()))); list.push_back(std::make_unique<WaitTreeText>(tr("priority = %1(current) / %2(normal)") .arg(thread.GetPriority()) .arg(thread.GetBasePriority()))); list.push_back(std::make_unique<WaitTreeText>( tr("last running ticks = %1").arg(thread.GetLastScheduledTick()))); - const VAddr mutex_wait_address = thread.GetMutexWaitAddressForDebugging(); - if (mutex_wait_address != 0) { - const auto& handle_table = thread.GetOwnerProcess()->GetHandleTable(); - list.push_back( - std::make_unique<WaitTreeMutexInfo>(mutex_wait_address, handle_table, system)); - } else { - list.push_back(std::make_unique<WaitTreeText>(tr("not waiting for mutex"))); - } - - if (thread.GetState() == Kernel::ThreadState::Waiting && - thread.GetWaitReasonForDebugging() == - Kernel::ThreadWaitReasonForDebugging::Synchronization) { - list.push_back(std::make_unique<WaitTreeObjectList>(thread.GetWaitObjectsForDebugging(), - thread.IsCancellable(), system)); - } - list.push_back(std::make_unique<WaitTreeCallstack>(thread, system)); return list; diff --git a/src/yuzu/debugger/wait_tree.h b/src/yuzu/debugger/wait_tree.h index 7e528b592..23c329fbe 100644 --- a/src/yuzu/debugger/wait_tree.h +++ b/src/yuzu/debugger/wait_tree.h @@ -74,25 +74,6 @@ public: bool IsExpandable() const override; }; -class WaitTreeMutexInfo : public WaitTreeExpandableItem { - Q_OBJECT -public: - explicit WaitTreeMutexInfo(VAddr mutex_address_, const Kernel::KHandleTable& handle_table, - Core::System& system_); - ~WaitTreeMutexInfo() override; - - QString GetText() const override; - std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; - -private: - VAddr mutex_address{}; - u32 mutex_value{}; - Kernel::Handle owner_handle{}; - Kernel::KThread* owner{}; - - Core::System& system; -}; - class WaitTreeCallstack : public WaitTreeExpandableItem { Q_OBJECT public: @@ -127,23 +108,6 @@ private: Core::System& system; }; -class WaitTreeObjectList : public WaitTreeExpandableItem { - Q_OBJECT -public: - WaitTreeObjectList(const std::vector<Kernel::KSynchronizationObject*>& list, bool wait_all, - Core::System& system_); - ~WaitTreeObjectList() override; - - QString GetText() const override; - std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override; - -private: - const std::vector<Kernel::KSynchronizationObject*>& object_list; - bool wait_all; - - Core::System& system; -}; - class WaitTreeThread : public WaitTreeSynchronizationObject { Q_OBJECT public: diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp index e263a07a7..b081fff6b 100644 --- a/src/yuzu/loading_screen.cpp +++ b/src/yuzu/loading_screen.cpp @@ -153,7 +153,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size } QString estimate; - // If theres a drastic slowdown in the rate, then display an estimate + // If there's a drastic slowdown in the rate, then display an estimate if (now - previous_time > milliseconds{50} || slow_shader_compile_start) { if (!slow_shader_compile_start) { slow_shader_start = steady_clock::now(); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c092507f4..ae14884b5 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -274,7 +274,7 @@ static QString PrettyProductName() { #ifdef _WIN32 static void OverrideWindowsFont() { - // Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrllic characters + // Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrillic characters // Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters. const QString startup_font = QApplication::font().family(); const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")}; @@ -3596,7 +3596,7 @@ bool GMainWindow::CreateShortcut(const std::string& shortcut_path, const std::st const std::string& command, const std::string& arguments, const std::string& categories, const std::string& keywords) { #if defined(__linux__) || defined(__FreeBSD__) - // This desktop file template was writting referencing + // This desktop file template was writing referencing // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html std::string shortcut_contents{}; shortcut_contents.append("[Desktop Entry]\n"); diff --git a/src/yuzu/multiplayer/lobby.cpp b/src/yuzu/multiplayer/lobby.cpp index 6c93e3511..387f6f7c9 100644 --- a/src/yuzu/multiplayer/lobby.cpp +++ b/src/yuzu/multiplayer/lobby.cpp @@ -278,7 +278,7 @@ void Lobby::OnRefreshLobby() { } } - // Reenable the refresh button and resize the columns + // Re-enable the refresh button and resize the columns ui->refresh_list->setEnabled(true); ui->refresh_list->setText(tr("Refresh List")); ui->room_list->header()->stretchLastSection(); diff --git a/src/yuzu/multiplayer/state.cpp b/src/yuzu/multiplayer/state.cpp index 285bb150d..d82ca9aee 100644 --- a/src/yuzu/multiplayer/state.cpp +++ b/src/yuzu/multiplayer/state.cpp @@ -112,7 +112,7 @@ void MultiplayerState::SetNotificationStatus(NotificationStatus status) { void MultiplayerState::UpdateNotificationStatus() { switch (notification_status) { - case NotificationStatus::Unitialized: + case NotificationStatus::Uninitialized: status_icon->setPixmap(QIcon::fromTheme(QStringLiteral("disconnected")).pixmap(16)); status_text->setText(tr("Not Connected. Click here to find a room!")); leave_room->setEnabled(false); diff --git a/src/yuzu/multiplayer/state.h b/src/yuzu/multiplayer/state.h index 5d681c5c6..d6149838f 100644 --- a/src/yuzu/multiplayer/state.h +++ b/src/yuzu/multiplayer/state.h @@ -23,7 +23,7 @@ class MultiplayerState : public QWidget { public: enum class NotificationStatus { - Unitialized, + Uninitialized, Disconnected, Connected, Notification, @@ -98,7 +98,7 @@ private: QAction* show_room; std::shared_ptr<Core::AnnounceMultiplayerSession> announce_multiplayer_session; Network::RoomMember::State current_state = Network::RoomMember::State::Uninitialized; - NotificationStatus notification_status = NotificationStatus::Unitialized; + NotificationStatus notification_status = NotificationStatus::Uninitialized; bool has_mod_perms = false; Network::RoomMember::CallbackHandle<Network::RoomMember::State> state_callback_handle; Network::RoomMember::CallbackHandle<Network::RoomMember::Error> error_callback_handle; diff --git a/src/yuzu/startup_checks.cpp b/src/yuzu/startup_checks.cpp index 9f702fe95..5e1f76339 100644 --- a/src/yuzu/startup_checks.cpp +++ b/src/yuzu/startup_checks.cpp @@ -86,7 +86,7 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan, bool perform_vulka return false; } - // Wait until the processs exits and get exit code from it + // Wait until the process exits and get exit code from it WaitForSingleObject(process_info.hProcess, INFINITE); DWORD exit_code = STILL_ACTIVE; const int err = GetExitCodeProcess(process_info.hProcess, &exit_code); diff --git a/src/yuzu/util/overlay_dialog.h b/src/yuzu/util/overlay_dialog.h index 872283d61..62f9da311 100644 --- a/src/yuzu/util/overlay_dialog.h +++ b/src/yuzu/util/overlay_dialog.h @@ -71,7 +71,7 @@ private: const QString& left_button_text, const QString& right_button_text, Qt::Alignment alignment); - /// Moves and resizes the dialog to be fully overlayed on top of the parent window. + /// Moves and resizes the dialog to be fully overlaid on top of the parent window. void MoveAndResizeWindow(); /** |