mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-04 15:57:08 +02:00
[meta] clang-format literally all of the Qt code (#3706)
I'm tired of dealing with this tbh Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3706 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
769edbfea3
commit
8678cb06eb
107 changed files with 1457 additions and 1737 deletions
|
|
@ -43,7 +43,8 @@ ModSelectDialog::ModSelectDialog(const QStringList& mods, QWidget* parent)
|
|||
width = qMax(width, item_model->item(i)->sizeHint().width());
|
||||
}
|
||||
|
||||
width += ui->treeView->contentsMargins().left() * 4 + ui->treeView->contentsMargins().right() * 4;
|
||||
width +=
|
||||
ui->treeView->contentsMargins().left() * 4 + ui->treeView->contentsMargins().right() * 4;
|
||||
ui->treeView->setMinimumHeight(qMin(height, 600));
|
||||
ui->treeView->setMinimumWidth(qMin(width, 700));
|
||||
adjustSize();
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@ class ModSelectDialog : public QDialog {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ModSelectDialog(const QStringList &mods, QWidget* parent = nullptr);
|
||||
explicit ModSelectDialog(const QStringList& mods, QWidget* parent = nullptr);
|
||||
~ModSelectDialog();
|
||||
|
||||
signals:
|
||||
void modsSelected(const QStringList &mods);
|
||||
void modsSelected(const QStringList& mods);
|
||||
|
||||
private:
|
||||
Ui::ModSelectDialog* ui;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
|
|
@ -16,12 +16,12 @@
|
|||
#include "common/settings.h"
|
||||
#include "common/settings_common.h"
|
||||
#include "core/core.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure_audio.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/configure_audio.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
|
||||
ConfigureAudio::ConfigureAudio(const Core::System& system_,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||
|
|
@ -188,8 +188,8 @@ void ConfigureAudio::SetOutputSinkFromSinkID() {
|
|||
|
||||
const std::string new_sink_id = []() -> const std::string {
|
||||
const Settings::AudioEngine sink_id = Settings::values.sink_id.GetValue();
|
||||
const auto canonicalizations
|
||||
= Settings::EnumMetadata<Settings::AudioEngine>::Canonicalizations();
|
||||
const auto canonicalizations =
|
||||
Settings::EnumMetadata<Settings::AudioEngine>::Canonicalizations();
|
||||
|
||||
for (u32 i = 0; i < canonicalizations.size(); ++i) {
|
||||
const Settings::AudioEngine value = canonicalizations[i].second;
|
||||
|
|
@ -242,8 +242,8 @@ void ConfigureAudio::ApplyConfiguration() {
|
|||
|
||||
const u32 new_sink_id = [this]() {
|
||||
const std::string sink_id = sink_combo_box->currentText().toStdString();
|
||||
const auto canonicalizations
|
||||
= Settings::EnumMetadata<Settings::AudioEngine>::Canonicalizations();
|
||||
const auto canonicalizations =
|
||||
Settings::EnumMetadata<Settings::AudioEngine>::Canonicalizations();
|
||||
|
||||
for (u32 i = 0; i < canonicalizations.size(); ++i) {
|
||||
if (sink_id == canonicalizations[i].first)
|
||||
|
|
@ -291,7 +291,8 @@ void ConfigureAudio::InitializeAudioSinkComboBox() {
|
|||
sink_combo_box->clear();
|
||||
sink_combo_box->addItem(QString::fromUtf8(AudioCore::Sink::auto_device_name));
|
||||
for (const auto& id : AudioCore::Sink::GetSinkIDs())
|
||||
sink_combo_box->addItem(QString::fromStdString(std::string{Settings::CanonicalizeEnum(id)}));
|
||||
sink_combo_box->addItem(
|
||||
QString::fromStdString(std::string{Settings::CanonicalizeEnum(id)}));
|
||||
}
|
||||
|
||||
void ConfigureAudio::RetranslateUI() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
|
|
@ -76,9 +76,9 @@ void ConfigureCpu::Setup(const ConfigurationShared::Builder& builder) {
|
|||
} else if (setting->Id() == Settings::values.cpu_backend.Id()) {
|
||||
backend_layout->addWidget(widget);
|
||||
backend_combobox = widget->combobox;
|
||||
} else if (setting->Id() == Settings::values.fast_cpu_time.Id()
|
||||
|| setting->Id() == Settings::values.vtable_bouncing.Id()
|
||||
|| setting->Id() == Settings::values.cpu_ticks.Id()) {
|
||||
} else if (setting->Id() == Settings::values.fast_cpu_time.Id() ||
|
||||
setting->Id() == Settings::values.vtable_bouncing.Id() ||
|
||||
setting->Id() == Settings::values.cpu_ticks.Id()) {
|
||||
ui->general_layout->addWidget(widget);
|
||||
} else {
|
||||
// Presently, all other settings here are unsafe checkboxes
|
||||
|
|
@ -93,12 +93,12 @@ void ConfigureCpu::Setup(const ConfigurationShared::Builder& builder) {
|
|||
UpdateGroup();
|
||||
}
|
||||
|
||||
void ConfigureCpu::UpdateGroup()
|
||||
{
|
||||
void ConfigureCpu::UpdateGroup() {
|
||||
const u32 accuracy = accuracy_combobox->currentIndex();
|
||||
const u32 backend = backend_combobox->currentIndex();
|
||||
// TODO(crueter): see if this works on NCE
|
||||
ui->unsafe_group->setVisible(accuracy == (u32) Settings::CpuAccuracy::Unsafe && backend == (u32) Settings::CpuBackend::Dynarmic);
|
||||
ui->unsafe_group->setVisible(accuracy == (u32)Settings::CpuAccuracy::Unsafe &&
|
||||
backend == (u32)Settings::CpuBackend::Dynarmic);
|
||||
}
|
||||
|
||||
void ConfigureCpu::ApplyConfiguration() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QWidget>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
|
||||
class QComboBox;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "core/crypto/key_manager.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure_debug.h"
|
||||
#include "yuzu/configuration/configure_debug.h"
|
||||
#include "yuzu/debugger/console.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
|
||||
ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent)
|
||||
: QScrollArea(parent), ui{std::make_unique<Ui::ConfigureDebug>()}, system{system_} {
|
||||
|
|
@ -60,7 +60,8 @@ void ConfigureDebug::SetConfiguration() {
|
|||
|
||||
// Immutable after starting
|
||||
ui->homebrew_args_edit->setEnabled(runtime_lock);
|
||||
ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args.GetValue()));
|
||||
ui->homebrew_args_edit->setText(
|
||||
QString::fromStdString(Settings::values.program_args.GetValue()));
|
||||
ui->toggle_console->setEnabled(runtime_lock);
|
||||
ui->toggle_console->setChecked(UISettings::values.show_console.GetValue());
|
||||
ui->fs_access_log->setEnabled(runtime_lock);
|
||||
|
|
@ -84,7 +85,8 @@ void ConfigureDebug::SetConfiguration() {
|
|||
ui->disable_macro_hle->setEnabled(runtime_lock);
|
||||
ui->disable_macro_hle->setChecked(Settings::values.disable_macro_hle.GetValue());
|
||||
ui->disable_loop_safety_checks->setEnabled(runtime_lock);
|
||||
ui->disable_loop_safety_checks->setChecked(Settings::values.disable_shader_loop_safety_checks.GetValue());
|
||||
ui->disable_loop_safety_checks->setChecked(
|
||||
Settings::values.disable_shader_loop_safety_checks.GetValue());
|
||||
ui->perform_vulkan_check->setChecked(Settings::values.perform_vulkan_check.GetValue());
|
||||
ui->debug_knobs_spinbox->setValue(Settings::values.debug_knobs.GetValue());
|
||||
#ifdef YUZU_USE_QT_WEB_ENGINE
|
||||
|
|
@ -118,7 +120,8 @@ void ConfigureDebug::ApplyConfiguration() {
|
|||
Settings::values.enable_nsight_aftermath = ui->enable_nsight_aftermath->isChecked();
|
||||
Settings::values.dump_shaders = ui->dump_shaders->isChecked();
|
||||
Settings::values.dump_macros = ui->dump_macros->isChecked();
|
||||
Settings::values.disable_shader_loop_safety_checks = ui->disable_loop_safety_checks->isChecked();
|
||||
Settings::values.disable_shader_loop_safety_checks =
|
||||
ui->disable_loop_safety_checks->isChecked();
|
||||
Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked();
|
||||
Settings::values.disable_macro_hle = ui->disable_macro_hle->isChecked();
|
||||
Settings::values.extended_logging = ui->extended_logging->isChecked();
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "common/settings.h"
|
||||
#include "common/settings_enums.h"
|
||||
#include "core/core.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure.h"
|
||||
#include "vk_device_info.h"
|
||||
#include "yuzu/configuration/configure_applets.h"
|
||||
|
|
@ -30,15 +31,14 @@
|
|||
#include "yuzu/configuration/configure_ui.h"
|
||||
#include "yuzu/configuration/configure_web.h"
|
||||
#include "yuzu/hotkeys.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
|
||||
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
||||
InputCommon::InputSubsystem* input_subsystem,
|
||||
std::vector<VkDeviceInfo::Record>& vk_device_records,
|
||||
Core::System& system_, bool enable_web_config)
|
||||
: QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()},
|
||||
registry(registry_), system{system_}, builder{std::make_unique<ConfigurationShared::Builder>(
|
||||
this, !system_.IsPoweredOn())},
|
||||
: QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()}, registry(registry_),
|
||||
system{system_},
|
||||
builder{std::make_unique<ConfigurationShared::Builder>(this, !system_.IsPoweredOn())},
|
||||
applets_tab{std::make_unique<ConfigureApplets>(system_, nullptr, *builder, this)},
|
||||
audio_tab{std::make_unique<ConfigureAudio>(system_, nullptr, *builder, this)},
|
||||
cpu_tab{std::make_unique<ConfigureCpu>(system_, nullptr, *builder, this)},
|
||||
|
|
@ -46,9 +46,9 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
|||
filesystem_tab{std::make_unique<ConfigureFilesystem>(this)},
|
||||
general_tab{std::make_unique<ConfigureGeneral>(system_, nullptr, *builder, this)},
|
||||
graphics_advanced_tab{
|
||||
std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *builder, this)},
|
||||
std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *builder, this)},
|
||||
graphics_extensions_tab{
|
||||
std::make_unique<ConfigureGraphicsExtensions>(system_, nullptr, *builder, this)},
|
||||
std::make_unique<ConfigureGraphicsExtensions>(system_, nullptr, *builder, this)},
|
||||
ui_tab{std::make_unique<ConfigureUi>(system_, this)},
|
||||
graphics_tab{std::make_unique<ConfigureGraphics>(
|
||||
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
|
||||
|
|
@ -113,7 +113,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
|||
adjustSize();
|
||||
ui->selectorList->setCurrentRow(0);
|
||||
|
||||
// Selects the leftmost button on the bottom bar (Cancel as of writing)
|
||||
// Selects the leftmost button on the bottom bar (Cancel as of writing)
|
||||
ui->buttonBox->setFocus();
|
||||
}
|
||||
|
||||
|
|
@ -172,16 +172,17 @@ Q_DECLARE_METATYPE(QList<QWidget*>);
|
|||
|
||||
void ConfigureDialog::PopulateSelectionList() {
|
||||
const std::array<std::pair<QString, QList<QWidget*>>, 6> items{
|
||||
{{tr("General"),
|
||||
{general_tab.get(), hotkeys_tab.get(), ui_tab.get(), web_tab.get(), debug_tab_tab.get()}},
|
||||
{tr("System"),
|
||||
{system_tab.get(), profile_tab.get(), network_tab.get(), filesystem_tab.get(),
|
||||
applets_tab.get()}},
|
||||
{tr("CPU"), {cpu_tab.get()}},
|
||||
{tr("Graphics"), {graphics_tab.get(), graphics_advanced_tab.get(), graphics_extensions_tab.get()}},
|
||||
{tr("Audio"), {audio_tab.get()}},
|
||||
{tr("Controls"), input_tab->GetSubTabs()}},
|
||||
};
|
||||
{{tr("General"),
|
||||
{general_tab.get(), hotkeys_tab.get(), ui_tab.get(), web_tab.get(), debug_tab_tab.get()}},
|
||||
{tr("System"),
|
||||
{system_tab.get(), profile_tab.get(), network_tab.get(), filesystem_tab.get(),
|
||||
applets_tab.get()}},
|
||||
{tr("CPU"), {cpu_tab.get()}},
|
||||
{tr("Graphics"),
|
||||
{graphics_tab.get(), graphics_advanced_tab.get(), graphics_extensions_tab.get()}},
|
||||
{tr("Audio"), {audio_tab.get()}},
|
||||
{tr("Controls"), input_tab->GetSubTabs()}},
|
||||
};
|
||||
|
||||
[[maybe_unused]] const QSignalBlocker blocker(ui->selectorList);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
#include <vector>
|
||||
#include <QDialog>
|
||||
#include "configuration/shared_widget.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/vk_device_info.h"
|
||||
|
||||
namespace Core {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "yuzu/configuration/configure_filesystem.h"
|
||||
#include <filesystem>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
|
@ -12,10 +11,11 @@
|
|||
#include "common/fs/fs.h"
|
||||
#include "common/fs/path_util.h"
|
||||
#include "common/settings.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "qt_common/qt_compat.h"
|
||||
#include "qt_common/util/game.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure_filesystem.h"
|
||||
#include "yuzu/configuration/configure_filesystem.h"
|
||||
|
||||
ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureFilesystem>()) {
|
||||
|
|
@ -26,8 +26,7 @@ ConfigureFilesystem::ConfigureFilesystem(QWidget* parent)
|
|||
[this] { SetDirectory(DirectoryTarget::NAND, ui->nand_directory_edit); });
|
||||
connect(ui->sdmc_directory_button, &QToolButton::pressed, this,
|
||||
[this] { SetDirectory(DirectoryTarget::SD, ui->sdmc_directory_edit); });
|
||||
connect(ui->save_directory_button, &QToolButton::pressed, this,
|
||||
[this] { SetSaveDirectory(); });
|
||||
connect(ui->save_directory_button, &QToolButton::pressed, this, [this] { SetSaveDirectory(); });
|
||||
connect(ui->gamecard_path_button, &QToolButton::pressed, this,
|
||||
[this] { SetDirectory(DirectoryTarget::Gamecard, ui->gamecard_path_edit); });
|
||||
connect(ui->dump_path_button, &QToolButton::pressed, this,
|
||||
|
|
@ -221,9 +220,9 @@ void ConfigureFilesystem::PromptSaveMigration(const QString& from_path, const QS
|
|||
.arg(QString::fromStdString(dest_save_dir.string()));
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton reply = QMessageBox::question(
|
||||
this, tr("Migrate Save Data"), message,
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||
QMessageBox::StandardButton reply =
|
||||
QMessageBox::question(this, tr("Migrate Save Data"), message,
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||
|
||||
if (reply != QMessageBox::Yes) {
|
||||
return;
|
||||
|
|
@ -249,17 +248,17 @@ void ConfigureFilesystem::PromptSaveMigration(const QString& from_path, const QS
|
|||
progress.close();
|
||||
|
||||
if (ec) {
|
||||
QMessageBox::warning(this, tr("Migration Failed"),
|
||||
tr("Failed to migrate save data:\n%1")
|
||||
.arg(QString::fromStdString(ec.message())));
|
||||
QMessageBox::warning(
|
||||
this, tr("Migration Failed"),
|
||||
tr("Failed to migrate save data:\n%1").arg(QString::fromStdString(ec.message())));
|
||||
return;
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton deleteReply = QMessageBox::question(
|
||||
this, tr("Migration Complete"),
|
||||
tr("Save data has been migrated successfully.\n\n"
|
||||
"Would you like to delete the old save data?"),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
QMessageBox::StandardButton deleteReply =
|
||||
QMessageBox::question(this, tr("Migration Complete"),
|
||||
tr("Save data has been migrated successfully.\n\n"
|
||||
"Would you like to delete the old save data?"),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
|
||||
if (deleteReply == QMessageBox::Yes) {
|
||||
Common::FS::RemoveDirRecursively(source_save_dir);
|
||||
|
|
@ -278,7 +277,6 @@ void ConfigureFilesystem::UpdateEnabledControls() {
|
|||
!ui->gamecard_current_game->isChecked());
|
||||
}
|
||||
|
||||
|
||||
void ConfigureFilesystem::RetranslateUI() {
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@
|
|||
#include <QMessageBox>
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure_general.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/configure_general.h"
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
|
||||
ConfigureGeneral::ConfigureGeneral(const Core::System& system_,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@
|
|||
#include "common/settings.h"
|
||||
#include "common/settings_enums.h"
|
||||
#include "core/core.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "qt_common/qt_common.h"
|
||||
#include "ui_configure_graphics.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/configure_graphics.h"
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
#include "qt_common/qt_common.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "yuzu/vk_device_info.h"
|
||||
|
||||
static const std::vector<VkPresentModeKHR> default_present_modes{VK_PRESENT_MODE_IMMEDIATE_KHR,
|
||||
|
|
@ -91,8 +91,7 @@ ConfigureGraphics::ConfigureGraphics(
|
|||
: ConfigurationShared::Tab(group_, parent), ui{std::make_unique<Ui::ConfigureGraphics>()},
|
||||
records{records_}, expose_compute_option{expose_compute_option_},
|
||||
update_aspect_ratio{update_aspect_ratio_}, system{system_},
|
||||
combobox_translations{builder.ComboboxTranslations()}
|
||||
{
|
||||
combobox_translations{builder.ComboboxTranslations()} {
|
||||
vulkan_device = Settings::values.vulkan_device.GetValue();
|
||||
RetrieveVulkanDevices();
|
||||
|
||||
|
|
@ -215,9 +214,9 @@ void ConfigureGraphics::PopulateVSyncModeSelection(bool use_setting) {
|
|||
|
||||
const Settings::VSyncMode global_vsync_mode = Settings::values.vsync_mode.GetValue(true);
|
||||
vsync_restore_global_button->setEnabled(
|
||||
((backend == Settings::RendererBackend::OpenGL_GLSL
|
||||
|| backend == Settings::RendererBackend::OpenGL_GLASM
|
||||
|| backend == Settings::RendererBackend::OpenGL_SPIRV) &&
|
||||
((backend == Settings::RendererBackend::OpenGL_GLSL ||
|
||||
backend == Settings::RendererBackend::OpenGL_GLASM ||
|
||||
backend == Settings::RendererBackend::OpenGL_SPIRV) &&
|
||||
(global_vsync_mode == Settings::VSyncMode::Immediate ||
|
||||
global_vsync_mode == Settings::VSyncMode::Fifo)) ||
|
||||
backend == Settings::RendererBackend::Vulkan);
|
||||
|
|
@ -286,7 +285,9 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) {
|
|||
api_combobox = widget->combobox;
|
||||
api_restore_global_button = widget->restore_button;
|
||||
if (!Settings::IsConfiguringGlobal()) {
|
||||
api_restore_global_button->connect(api_restore_global_button, &QAbstractButton::clicked, [this](bool) { UpdateAPILayout(); });
|
||||
api_restore_global_button->connect(api_restore_global_button,
|
||||
&QAbstractButton::clicked,
|
||||
[this](bool) { UpdateAPILayout(); });
|
||||
// Detach API's restore button and place it where we want
|
||||
// Lets us put it on the side, and it will automatically scale if there's a
|
||||
// second combobox (vulkan_device)
|
||||
|
|
@ -312,20 +313,21 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) {
|
|||
widget->layout()->addWidget(restore_button);
|
||||
|
||||
restore_button->connect(restore_button, &QAbstractButton::clicked,
|
||||
[restore_button, this](bool) {
|
||||
Settings::values.vsync_mode.SetGlobal(true);
|
||||
PopulateVSyncModeSelection(true);
|
||||
[restore_button, this](bool) {
|
||||
Settings::values.vsync_mode.SetGlobal(true);
|
||||
PopulateVSyncModeSelection(true);
|
||||
|
||||
restore_button->setVisible(false);
|
||||
});
|
||||
restore_button->setVisible(false);
|
||||
});
|
||||
|
||||
std::function<void()> set_non_global = [restore_button, this]() {
|
||||
Settings::values.vsync_mode.SetGlobal(false);
|
||||
UpdateVsyncSetting();
|
||||
restore_button->setVisible(true);
|
||||
};
|
||||
widget->combobox->connect(widget->combobox, QOverload<int>::of(&QComboBox::activated),
|
||||
[set_non_global]() { set_non_global(); });
|
||||
widget->combobox->connect(widget->combobox,
|
||||
QOverload<int>::of(&QComboBox::activated),
|
||||
[set_non_global]() { set_non_global(); });
|
||||
vsync_restore_global_button = restore_button;
|
||||
}
|
||||
hold_graphics.emplace(setting->Id(), widget);
|
||||
|
|
@ -364,15 +366,15 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) {
|
|||
ui->bg_widget->layout()->addWidget(bg_restore_button);
|
||||
|
||||
bg_restore_button->connect(bg_restore_button, &QAbstractButton::clicked,
|
||||
[bg_restore_button, this](bool) {
|
||||
const int r = Settings::values.bg_red.GetValue(true);
|
||||
const int g = Settings::values.bg_green.GetValue(true);
|
||||
const int b = Settings::values.bg_blue.GetValue(true);
|
||||
UpdateBackgroundColorButton(QColor::fromRgb(r, g, b));
|
||||
[bg_restore_button, this](bool) {
|
||||
const int r = Settings::values.bg_red.GetValue(true);
|
||||
const int g = Settings::values.bg_green.GetValue(true);
|
||||
const int b = Settings::values.bg_blue.GetValue(true);
|
||||
UpdateBackgroundColorButton(QColor::fromRgb(r, g, b));
|
||||
|
||||
bg_restore_button->setVisible(false);
|
||||
bg_restore_button->setEnabled(false);
|
||||
});
|
||||
bg_restore_button->setVisible(false);
|
||||
bg_restore_button->setEnabled(false);
|
||||
});
|
||||
|
||||
ui->bg_button->connect(ui->bg_button, &QAbstractButton::clicked, [bg_restore_button](bool) {
|
||||
bg_restore_button->setVisible(true);
|
||||
|
|
@ -397,17 +399,19 @@ const QString ConfigureGraphics::TranslateVSyncMode(VkPresentModeKHR mode,
|
|||
Settings::RendererBackend backend) const {
|
||||
switch (mode) {
|
||||
case VK_PRESENT_MODE_IMMEDIATE_KHR:
|
||||
return (backend == Settings::RendererBackend::OpenGL_GLSL
|
||||
|| backend == Settings::RendererBackend::OpenGL_GLASM
|
||||
|| backend == Settings::RendererBackend::OpenGL_SPIRV)
|
||||
? tr("Off") : QStringLiteral("Immediate (%1)").arg(tr("VSync Off"));
|
||||
return (backend == Settings::RendererBackend::OpenGL_GLSL ||
|
||||
backend == Settings::RendererBackend::OpenGL_GLASM ||
|
||||
backend == Settings::RendererBackend::OpenGL_SPIRV)
|
||||
? tr("Off")
|
||||
: QStringLiteral("Immediate (%1)").arg(tr("VSync Off"));
|
||||
case VK_PRESENT_MODE_MAILBOX_KHR:
|
||||
return QStringLiteral("Mailbox (%1)").arg(tr("Recommended"));
|
||||
case VK_PRESENT_MODE_FIFO_KHR:
|
||||
return (backend == Settings::RendererBackend::OpenGL_GLSL
|
||||
|| backend == Settings::RendererBackend::OpenGL_GLASM
|
||||
|| backend == Settings::RendererBackend::OpenGL_SPIRV)
|
||||
? tr("On") : QStringLiteral("FIFO (%1)").arg(tr("VSync On"));
|
||||
return (backend == Settings::RendererBackend::OpenGL_GLSL ||
|
||||
backend == Settings::RendererBackend::OpenGL_GLASM ||
|
||||
backend == Settings::RendererBackend::OpenGL_SPIRV)
|
||||
? tr("On")
|
||||
: QStringLiteral("FIFO (%1)").arg(tr("VSync On"));
|
||||
case VK_PRESENT_MODE_FIFO_RELAXED_KHR:
|
||||
return QStringLiteral("FIFO Relaxed");
|
||||
default:
|
||||
|
|
@ -416,7 +420,9 @@ const QString ConfigureGraphics::TranslateVSyncMode(VkPresentModeKHR mode,
|
|||
}
|
||||
|
||||
int ConfigureGraphics::FindIndex(u32 enumeration, int value) const {
|
||||
for (u32 i = 0; enumeration < combobox_translations.size() && i < combobox_translations.at(enumeration).size(); i++)
|
||||
for (u32 i = 0; enumeration < combobox_translations.size() &&
|
||||
i < combobox_translations.at(enumeration).size();
|
||||
i++)
|
||||
if (combobox_translations.at(enumeration)[i].first == u32(value))
|
||||
return i;
|
||||
return -1;
|
||||
|
|
@ -432,10 +438,14 @@ void ConfigureGraphics::ApplyConfiguration() {
|
|||
|
||||
Settings::values.vulkan_device.SetGlobal(true);
|
||||
auto const index = Settings::EnumMetadata<Settings::RendererBackend>::Index();
|
||||
if (Settings::IsConfiguringGlobal() || (!Settings::IsConfiguringGlobal() && api_restore_global_button->isEnabled())) {
|
||||
auto backend = index >= combobox_translations.size() || size_t(api_combobox->currentIndex()) >= combobox_translations.at(index).size()
|
||||
? Settings::values.renderer_backend.GetValue()
|
||||
: Settings::RendererBackend(combobox_translations.at(index)[api_combobox->currentIndex()].first);
|
||||
if (Settings::IsConfiguringGlobal() ||
|
||||
(!Settings::IsConfiguringGlobal() && api_restore_global_button->isEnabled())) {
|
||||
auto backend =
|
||||
index >= combobox_translations.size() ||
|
||||
size_t(api_combobox->currentIndex()) >= combobox_translations.at(index).size()
|
||||
? Settings::values.renderer_backend.GetValue()
|
||||
: Settings::RendererBackend(
|
||||
combobox_translations.at(index)[api_combobox->currentIndex()].first);
|
||||
switch (backend) {
|
||||
case Settings::RendererBackend::Vulkan:
|
||||
Settings::values.vulkan_device.SetGlobal(Settings::IsConfiguringGlobal());
|
||||
|
|
@ -506,12 +516,15 @@ Settings::RendererBackend ConfigureGraphics::GetCurrentGraphicsBackend() const {
|
|||
auto const index = Settings::EnumMetadata<Settings::RendererBackend>::Index();
|
||||
if (!Settings::IsConfiguringGlobal() && !api_restore_global_button->isEnabled())
|
||||
return Settings::values.renderer_backend.GetValue(true);
|
||||
return index >= combobox_translations.size() || size_t(api_combobox->currentIndex()) >= combobox_translations.at(index).size()
|
||||
? Settings::values.renderer_backend.GetValue()
|
||||
: Settings::RendererBackend(combobox_translations.at(index).at(api_combobox->currentIndex()).first);
|
||||
return index >= combobox_translations.size() || size_t(api_combobox->currentIndex()) >=
|
||||
combobox_translations.at(index).size()
|
||||
? Settings::values.renderer_backend.GetValue()
|
||||
: Settings::RendererBackend(
|
||||
combobox_translations.at(index).at(api_combobox->currentIndex()).first);
|
||||
}();
|
||||
|
||||
if (selected_backend == Settings::RendererBackend::Vulkan && UISettings::values.has_broken_vulkan)
|
||||
if (selected_backend == Settings::RendererBackend::Vulkan &&
|
||||
UISettings::values.has_broken_vulkan)
|
||||
return Settings::RendererBackend::OpenGL_GLSL;
|
||||
return selected_backend;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
#include <qnamespace.h>
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "ui_configure_graphics_advanced.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/configure_graphics_advanced.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
|
||||
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(
|
||||
|
|
|
|||
|
|
@ -1,26 +1,27 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <vector>
|
||||
#include <QLabel>
|
||||
#include <qnamespace.h>
|
||||
#include <QCheckBox>
|
||||
#include <QLabel>
|
||||
#include <QSlider>
|
||||
#include <qnamespace.h>
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "ui_configure_graphics_extensions.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/configure_graphics_extensions.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
|
||||
ConfigureGraphicsExtensions::ConfigureGraphicsExtensions(
|
||||
const Core::System& system_, std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent)
|
||||
: Tab(group_, parent), ui{std::make_unique<Ui::ConfigureGraphicsExtensions>()}, system{system_} {
|
||||
: Tab(group_, parent), ui{std::make_unique<Ui::ConfigureGraphicsExtensions>()},
|
||||
system{system_} {
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
|
|
@ -44,8 +45,8 @@ void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& buil
|
|||
if (setting->Id() == Settings::values.sample_shading.Id()) {
|
||||
// TODO(crueter): should support this natively perhaps?
|
||||
return builder.BuildWidget(
|
||||
setting, apply_funcs, ConfigurationShared::RequestType::Slider, true,
|
||||
1.0f, nullptr, tr("%", "Sample Shading percentage (e.g. 50%)"));
|
||||
setting, apply_funcs, ConfigurationShared::RequestType::Slider, true, 1.0f,
|
||||
nullptr, tr("%", "Sample Shading percentage (e.g. 50%)"));
|
||||
} else {
|
||||
return builder.BuildWidget(setting, apply_funcs);
|
||||
}
|
||||
|
|
@ -64,7 +65,8 @@ void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& buil
|
|||
#ifdef __APPLE__
|
||||
if (setting->Id() == Settings::values.dyna_state.Id()) {
|
||||
widget->setEnabled(false);
|
||||
widget->setToolTip(tr("Extended Dynamic State is disabled on macOS due to MoltenVK compatibility issues that cause black screens."));
|
||||
widget->setToolTip(tr("Extended Dynamic State is disabled on macOS due to MoltenVK "
|
||||
"compatibility issues that cause black screens."));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2017 Citra Emulator Project
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
#include "hid_core/hid_core.h"
|
||||
|
||||
#include "frontend_common/config.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure_hotkeys.h"
|
||||
#include "yuzu/configuration/configure_hotkeys.h"
|
||||
#include "yuzu/hotkeys.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "yuzu/util/sequence_dialog/sequence_dialog.h"
|
||||
|
||||
constexpr int name_column = 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
||||
|
|
@ -15,10 +15,10 @@
|
|||
#include "core/hle/service/sm/sm.h"
|
||||
#include "hid_core/frontend/emulated_controller.h"
|
||||
#include "hid_core/hid_core.h"
|
||||
#include "qt_common/qt_compat.h"
|
||||
#include "ui_configure_input.h"
|
||||
#include "ui_configure_input_advanced.h"
|
||||
#include "ui_configure_input_player.h"
|
||||
#include "qt_common/qt_compat.h"
|
||||
#include "yuzu/configuration/configure_camera.h"
|
||||
#include "yuzu/configuration/configure_debug_controller.h"
|
||||
#include "yuzu/configuration/configure_input.h"
|
||||
|
|
@ -102,7 +102,7 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem,
|
|||
};
|
||||
|
||||
for (std::size_t i = 0; i < player_tabs.size(); ++i) {
|
||||
QHBoxLayout *tab_layout = new QHBoxLayout(player_tabs[i]);
|
||||
QHBoxLayout* tab_layout = new QHBoxLayout(player_tabs[i]);
|
||||
tab_layout->addWidget(player_controllers[i]);
|
||||
connect(player_controllers[i], &ConfigureInputPlayer::Connected, [this, i](bool checked) {
|
||||
// Ensures that connecting a controller changes the number of players
|
||||
|
|
@ -125,10 +125,11 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem,
|
|||
&ConfigureInput::UpdateAllInputDevices);
|
||||
connect(player_controllers[i], &ConfigureInputPlayer::RefreshInputProfiles, this,
|
||||
&ConfigureInput::UpdateAllInputProfiles, Qt::QueuedConnection);
|
||||
connect(connected_controller_checkboxes[i], &QCheckBox::STATE_CHANGED, [this, i](int state) {
|
||||
// Keep activated controllers synced with the "Connected Controllers" checkboxes
|
||||
player_controllers[i]->ConnectPlayer(state == Qt::Checked);
|
||||
});
|
||||
connect(connected_controller_checkboxes[i], &QCheckBox::STATE_CHANGED,
|
||||
[this, i](int state) {
|
||||
// Keep activated controllers synced with the "Connected Controllers" checkboxes
|
||||
player_controllers[i]->ConnectPlayer(state == Qt::Checked);
|
||||
});
|
||||
|
||||
// Remove/hide all the elements that exceed max_players, if applicable.
|
||||
if (i >= max_players) {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
#include "core/core.h"
|
||||
#include "hid_core/frontend/emulated_controller.h"
|
||||
#include "hid_core/hid_core.h"
|
||||
#include "ui_configure_input_advanced.h"
|
||||
#include "qt_common/qt_compat.h"
|
||||
#include "ui_configure_input_advanced.h"
|
||||
#include "yuzu/configuration/configure_input_advanced.h"
|
||||
|
||||
ConfigureInputAdvanced::ConfigureInputAdvanced(Core::HID::HIDCore& hid_core_, QWidget* parent)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
#include <QWidget>
|
||||
|
||||
#include "qt_common/config/qt_config.h"
|
||||
#include "ui_configure_input_per_game.h"
|
||||
#include "yuzu/configuration/input_profiles.h"
|
||||
#include "qt_common/config/qt_config.h"
|
||||
|
||||
class QComboBox;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
||||
|
|
@ -14,13 +14,13 @@
|
|||
#include <QTimer>
|
||||
#include "common/assert.h"
|
||||
#include "common/param_package.h"
|
||||
#include "qt_common/config/qt_config.h"
|
||||
#include "hid_core/frontend/emulated_controller.h"
|
||||
#include "hid_core/hid_core.h"
|
||||
#include "hid_core/hid_types.h"
|
||||
#include "input_common/drivers/keyboard.h"
|
||||
#include "input_common/drivers/mouse.h"
|
||||
#include "input_common/main.h"
|
||||
#include "qt_common/config/qt_config.h"
|
||||
#include "ui_configure_input_player.h"
|
||||
#include "yuzu/bootmanager.h"
|
||||
#include "yuzu/configuration/configure_input_player.h"
|
||||
|
|
@ -294,11 +294,11 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
|||
InputCommon::InputSubsystem* input_subsystem_,
|
||||
InputProfiles* profiles_, Core::HID::HIDCore& hid_core_,
|
||||
bool is_powered_on_, bool debug_)
|
||||
: QWidget(parent),
|
||||
ui(std::make_unique<Ui::ConfigureInputPlayer>()), player_index{player_index_}, debug{debug_},
|
||||
is_powered_on{is_powered_on_}, input_subsystem{input_subsystem_}, profiles(profiles_),
|
||||
timeout_timer(std::make_unique<QTimer>()),
|
||||
poll_timer(std::make_unique<QTimer>()), bottom_row{bottom_row_}, hid_core{hid_core_} {
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureInputPlayer>()),
|
||||
player_index{player_index_}, debug{debug_}, is_powered_on{is_powered_on_},
|
||||
input_subsystem{input_subsystem_}, profiles(profiles_),
|
||||
timeout_timer(std::make_unique<QTimer>()), poll_timer(std::make_unique<QTimer>()),
|
||||
bottom_row{bottom_row_}, hid_core{hid_core_} {
|
||||
if (player_index == 0) {
|
||||
auto* emulated_controller_p1 =
|
||||
hid_core.GetEmulatedController(Core::HID::NpadIdType::Player1);
|
||||
|
|
@ -1215,10 +1215,8 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() {
|
|||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
layout_hidden = {
|
||||
ui->buttonShoulderButtonsSLSRLeft,
|
||||
ui->buttonShoulderButtonsSLSRRight,
|
||||
ui->horizontalSpacerShoulderButtonsWidget2,
|
||||
ui->horizontalSpacerShoulderButtonsWidget4,
|
||||
ui->buttonShoulderButtonsSLSRLeft, ui->buttonShoulderButtonsSLSRRight,
|
||||
ui->horizontalSpacerShoulderButtonsWidget2, ui->horizontalSpacerShoulderButtonsWidget4,
|
||||
ui->buttonMiscButtonsScreenshotGroup,
|
||||
};
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
|
|
@ -2432,7 +2432,8 @@ void PlayerControlPreview::DrawProJoystick(QPainter& p, const QPointF center, co
|
|||
1.0 - std::sqrt((offset.x() * offset.x()) + (offset.y() * offset.y())) * 0.1f);
|
||||
|
||||
const float rotation =
|
||||
((offset.x() == 0.f) ? std::atan(1.f) * 2.f : std::atan(offset.y() / offset.x())) * (180.f / (std::atan(1.f) * 4.f));
|
||||
((offset.x() == 0.f) ? std::atan(1.f) * 2.f : std::atan(offset.y() / offset.x())) *
|
||||
(180.f / (std::atan(1.f) * 4.f));
|
||||
|
||||
p.save();
|
||||
p.translate(offset_center);
|
||||
|
|
|
|||
|
|
@ -12,10 +12,7 @@
|
|||
#include "yuzu/configuration/configure_network.h"
|
||||
|
||||
ConfigureNetwork::ConfigureNetwork(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(std::make_unique<Ui::ConfigureNetwork>())
|
||||
, system{system_}
|
||||
{
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureNetwork>()), system{system_} {
|
||||
ui->setupUi(this);
|
||||
for (const auto& iface : Network::GetAvailableNetworkInterfaces())
|
||||
ui->network_interface->addItem(QString::fromStdString(iface.name));
|
||||
|
|
|
|||
|
|
@ -29,28 +29,28 @@
|
|||
#include "core/file_sys/xts_archive.h"
|
||||
#include "core/loader/loader.h"
|
||||
#include "frontend_common/config.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure_per_game.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/configure_applets.h"
|
||||
#include "yuzu/configuration/configure_audio.h"
|
||||
#include "yuzu/configuration/configure_cpu.h"
|
||||
#include "yuzu/configuration/configure_graphics.h"
|
||||
#include "yuzu/configuration/configure_graphics_advanced.h"
|
||||
#include "yuzu/configuration/configure_graphics_extensions.h"
|
||||
#include "yuzu/configuration/configure_input_per_game.h"
|
||||
#include "yuzu/configuration/configure_network.h"
|
||||
#include "yuzu/configuration/configure_per_game.h"
|
||||
#include "yuzu/configuration/configure_per_game_addons.h"
|
||||
#include "yuzu/configuration/configure_system.h"
|
||||
#include "yuzu/configuration/configure_network.h"
|
||||
#include "yuzu/configuration/configure_applets.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "yuzu/util/util.h"
|
||||
#include "yuzu/vk_device_info.h"
|
||||
|
||||
ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::string& file_name,
|
||||
std::vector<VkDeviceInfo::Record>& vk_device_records,
|
||||
Core::System& system_)
|
||||
: QDialog(parent),
|
||||
ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_}, system{system_},
|
||||
: QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_},
|
||||
system{system_},
|
||||
builder{std::make_unique<ConfigurationShared::Builder>(this, !system_.IsPoweredOn())},
|
||||
tab_group{std::make_shared<std::vector<ConfigurationShared::Tab*>>()} {
|
||||
const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name));
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
#include "configuration/shared_widget.h"
|
||||
#include "core/file_sys/vfs/vfs_types.h"
|
||||
#include "frontend_common/config.h"
|
||||
#include "vk_device_info.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "qt_common/config/qt_config.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "vk_device_info.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* p
|
|||
connect(ui->folder, &QAbstractButton::clicked, this, &ConfigurePerGameAddons::InstallModFolder);
|
||||
connect(ui->zip, &QAbstractButton::clicked, this, &ConfigurePerGameAddons::InstallModZip);
|
||||
|
||||
connect(tree_view, &QTreeView::customContextMenuRequested, this, &ConfigurePerGameAddons::showContextMenu);
|
||||
connect(tree_view, &QTreeView::customContextMenuRequested, this,
|
||||
&ConfigurePerGameAddons::showContextMenu);
|
||||
}
|
||||
|
||||
ConfigurePerGameAddons::~ConfigurePerGameAddons() = default;
|
||||
|
|
@ -92,10 +93,10 @@ void ConfigurePerGameAddons::OnItemChanged(QStandardItem* item) {
|
|||
for (auto* update_item : update_items) {
|
||||
if (update_item != item && update_item->checkState() == Qt::Checked) {
|
||||
disconnect(item_model, &QStandardItemModel::itemChanged, this,
|
||||
&ConfigurePerGameAddons::OnItemChanged);
|
||||
&ConfigurePerGameAddons::OnItemChanged);
|
||||
update_item->setCheckState(Qt::Unchecked);
|
||||
connect(item_model, &QStandardItemModel::itemChanged, this,
|
||||
&ConfigurePerGameAddons::OnItemChanged);
|
||||
&ConfigurePerGameAddons::OnItemChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -109,7 +110,8 @@ void ConfigurePerGameAddons::ApplyConfiguration() {
|
|||
const auto disabled = item.front()->checkState() == Qt::Unchecked;
|
||||
if (disabled) {
|
||||
QVariant userData = item.front()->data(Qt::UserRole);
|
||||
if (userData.isValid() && userData.canConvert<quint32>() && item.front()->text() == QStringLiteral("Update")) {
|
||||
if (userData.isValid() && userData.canConvert<quint32>() &&
|
||||
item.front()->text() == QStringLiteral("Update")) {
|
||||
quint32 numeric_version = userData.toUInt();
|
||||
disabled_addons.push_back(fmt::format("Update@{}", numeric_version));
|
||||
} else {
|
||||
|
|
@ -164,7 +166,7 @@ void ConfigurePerGameAddons::InstallMods(const QStringList& mods) {
|
|||
}
|
||||
}
|
||||
|
||||
void ConfigurePerGameAddons::InstallModPath(const QString& path, const QString &fallbackName) {
|
||||
void ConfigurePerGameAddons::InstallModPath(const QString& path, const QString& fallbackName) {
|
||||
const auto mods = QtCommon::Mod::GetModFolders(path, fallbackName);
|
||||
|
||||
if (mods.size() > 1) {
|
||||
|
|
@ -203,8 +205,9 @@ void ConfigurePerGameAddons::InstallModZip() {
|
|||
|
||||
void ConfigurePerGameAddons::AddonDeleteRequested(QList<QModelIndex> selected) {
|
||||
QList<QModelIndex> filtered;
|
||||
for (const QModelIndex &index : selected) {
|
||||
if (!index.data(PATCH_LOCATION).toString().isEmpty()) filtered << index;
|
||||
for (const QModelIndex& index : selected) {
|
||||
if (!index.data(PATCH_LOCATION).toString().isEmpty())
|
||||
filtered << index;
|
||||
}
|
||||
|
||||
if (filtered.empty()) {
|
||||
|
|
@ -215,10 +218,9 @@ void ConfigurePerGameAddons::AddonDeleteRequested(QList<QModelIndex> selected) {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
const auto header = tr("You are about to delete the following installed mods:\n");
|
||||
QString selected_str;
|
||||
for (const QModelIndex &index : filtered) {
|
||||
for (const QModelIndex& index : filtered) {
|
||||
selected_str = selected_str % index.data().toString() % QStringLiteral("\n");
|
||||
}
|
||||
|
||||
|
|
@ -231,9 +233,10 @@ void ConfigurePerGameAddons::AddonDeleteRequested(QList<QModelIndex> selected) {
|
|||
QtCommon::Frontend::StandardButton::Yes |
|
||||
QtCommon::Frontend::StandardButton::No);
|
||||
|
||||
if (choice == QtCommon::Frontend::StandardButton::No) return;
|
||||
if (choice == QtCommon::Frontend::StandardButton::No)
|
||||
return;
|
||||
|
||||
for (const QModelIndex &index : filtered) {
|
||||
for (const QModelIndex& index : filtered) {
|
||||
std::filesystem::remove_all(index.data(PATCH_LOCATION).toString().toStdString());
|
||||
}
|
||||
|
||||
|
|
@ -252,17 +255,18 @@ void ConfigurePerGameAddons::showContextMenu(const QPoint& pos) {
|
|||
auto selected = tree_view->selectionModel()->selectedRows();
|
||||
if (index.isValid() && selected.empty()) {
|
||||
QModelIndex idx = item_model->index(index.row(), 0);
|
||||
if (idx.isValid()) selected << idx;
|
||||
if (idx.isValid())
|
||||
selected << idx;
|
||||
}
|
||||
|
||||
if (selected.empty()) return;
|
||||
if (selected.empty())
|
||||
return;
|
||||
|
||||
QMenu menu(this);
|
||||
|
||||
QAction *remove = menu.addAction(tr("&Delete"));
|
||||
connect(remove, &QAction::triggered, this, [this, selected]() {
|
||||
AddonDeleteRequested(selected);
|
||||
});
|
||||
QAction* remove = menu.addAction(tr("&Delete"));
|
||||
connect(remove, &QAction::triggered, this,
|
||||
[this, selected]() { AddonDeleteRequested(selected); });
|
||||
|
||||
if (selected.length() == 1) {
|
||||
auto loc = selected.at(0).data(PATCH_LOCATION).toString();
|
||||
|
|
@ -333,9 +337,11 @@ void ConfigurePerGameAddons::LoadConfiguration() {
|
|||
bool patch_disabled = false;
|
||||
if (is_external_update) {
|
||||
std::string disabled_key = fmt::format("Update@{}", patch.numeric_version);
|
||||
patch_disabled = std::find(disabled.begin(), disabled.end(), disabled_key) != disabled.end();
|
||||
patch_disabled =
|
||||
std::find(disabled.begin(), disabled.end(), disabled_key) != disabled.end();
|
||||
} else {
|
||||
patch_disabled = std::find(disabled.begin(), disabled.end(), name.toStdString()) != disabled.end();
|
||||
patch_disabled =
|
||||
std::find(disabled.begin(), disabled.end(), name.toStdString()) != disabled.end();
|
||||
}
|
||||
|
||||
bool should_enable = !patch_disabled;
|
||||
|
|
|
|||
|
|
@ -32,10 +32,7 @@ class ConfigurePerGameAddons : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum PatchData {
|
||||
NUMERIC_VERSION = Qt::UserRole,
|
||||
PATCH_LOCATION
|
||||
};
|
||||
enum PatchData { NUMERIC_VERSION = Qt::UserRole, PATCH_LOCATION };
|
||||
|
||||
explicit ConfigurePerGameAddons(Core::System& system_, QWidget* parent = nullptr);
|
||||
~ConfigurePerGameAddons() override;
|
||||
|
|
@ -48,7 +45,7 @@ public:
|
|||
void SetTitleId(u64 id);
|
||||
|
||||
public slots:
|
||||
void InstallMods(const QStringList &mods);
|
||||
void InstallMods(const QStringList& mods);
|
||||
void InstallModPath(const QString& path, const QString& fallbackName = {});
|
||||
|
||||
void InstallModFolder();
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@ ConfigureProfileManager::ConfigureProfileManager(Core::System& system_, QWidget*
|
|||
|
||||
ui->scrollArea->setLayout(layout);
|
||||
|
||||
connect(tree_view, &QTreeView::customContextMenuRequested, this, &ConfigureProfileManager::showContextMenu);
|
||||
connect(tree_view, &QTreeView::customContextMenuRequested, this,
|
||||
&ConfigureProfileManager::showContextMenu);
|
||||
|
||||
connect(tree_view, &QTreeView::clicked, this, &ConfigureProfileManager::SelectUser);
|
||||
|
||||
|
|
@ -229,8 +230,7 @@ void ConfigureProfileManager::showContextMenu(const QPoint& pos) {
|
|||
QAction* edit = menu.addAction(tr("&Edit"));
|
||||
QAction* remove = menu.addAction(tr("&Delete"));
|
||||
|
||||
QAction* chosen =
|
||||
menu.exec(tree_view->viewport()->mapToGlobal(pos));
|
||||
QAction* chosen = menu.exec(tree_view->viewport()->mapToGlobal(pos));
|
||||
|
||||
if (!chosen)
|
||||
return;
|
||||
|
|
@ -250,7 +250,7 @@ void ConfigureProfileManager::SelectUser(const QModelIndex& index) {
|
|||
}
|
||||
|
||||
void ConfigureProfileManager::AddUser() {
|
||||
NewUserDialog *dialog = new NewUserDialog(this);
|
||||
NewUserDialog* dialog = new NewUserDialog(this);
|
||||
|
||||
connect(dialog, &NewUserDialog::userAdded, this, [dialog, this](User user) {
|
||||
auto uuid = user.uuid;
|
||||
|
|
@ -285,35 +285,37 @@ void ConfigureProfileManager::EditUser() {
|
|||
std::string username;
|
||||
username.reserve(32);
|
||||
|
||||
std::ranges::copy_if(profile.username, std::back_inserter(username), [](u8 byte) { return byte != 0; });
|
||||
std::ranges::copy_if(profile.username, std::back_inserter(username),
|
||||
[](u8 byte) { return byte != 0; });
|
||||
|
||||
NewUserDialog *dialog = new NewUserDialog(uuid.value(), username, tr("Edit User"), this);
|
||||
NewUserDialog* dialog = new NewUserDialog(uuid.value(), username, tr("Edit User"), this);
|
||||
|
||||
connect(dialog, &NewUserDialog::userAdded, this, [dialog, profile, user_idx, uuid, this](User user) mutable {
|
||||
// TODO: MOVE UUID
|
||||
// auto new_uuid = user.uuid;
|
||||
auto new_username = user.username;
|
||||
auto pixmap = user.pixmap;
|
||||
connect(dialog, &NewUserDialog::userAdded, this,
|
||||
[dialog, profile, user_idx, uuid, this](User user) mutable {
|
||||
// TODO: MOVE UUID
|
||||
// auto new_uuid = user.uuid;
|
||||
auto new_username = user.username;
|
||||
auto pixmap = user.pixmap;
|
||||
|
||||
auto const uuid_val = uuid.value();
|
||||
auto const uuid_val = uuid.value();
|
||||
|
||||
const auto username_std = new_username.toStdString();
|
||||
std::fill(profile.username.begin(), profile.username.end(), '\0');
|
||||
std::copy(username_std.begin(), username_std.end(), profile.username.begin());
|
||||
const auto username_std = new_username.toStdString();
|
||||
std::fill(profile.username.begin(), profile.username.end(), '\0');
|
||||
std::copy(username_std.begin(), username_std.end(), profile.username.begin());
|
||||
|
||||
profile_manager.SetProfileBase(uuid_val, profile);
|
||||
profile_manager.WriteUserSaveFile();
|
||||
profile_manager.SetProfileBase(uuid_val, profile);
|
||||
profile_manager.WriteUserSaveFile();
|
||||
|
||||
item_model->setItem(
|
||||
user_idx, 0,
|
||||
new QStandardItem{pixmap,
|
||||
FormatUserEntryText(QString::fromStdString(username_std), uuid_val)});
|
||||
item_model->setItem(
|
||||
user_idx, 0,
|
||||
new QStandardItem{pixmap, FormatUserEntryText(
|
||||
QString::fromStdString(username_std), uuid_val)});
|
||||
|
||||
saveImage(pixmap, uuid_val);
|
||||
UpdateCurrentUser();
|
||||
saveImage(pixmap, uuid_val);
|
||||
UpdateCurrentUser();
|
||||
|
||||
dialog->deleteLater();
|
||||
});
|
||||
dialog->deleteLater();
|
||||
});
|
||||
|
||||
connect(dialog, &QDialog::rejected, dialog, &QObject::deleteLater);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ public:
|
|||
explicit ConfigureProfileManagerDeleteDialog(QWidget* parent);
|
||||
~ConfigureProfileManagerDeleteDialog();
|
||||
|
||||
void SetInfo(const QString& username, const Common::UUID& uuid,
|
||||
int index);
|
||||
void SetInfo(const QString& username, const Common::UUID& uuid, int index);
|
||||
|
||||
signals:
|
||||
void deleteUser(int index);
|
||||
|
|
@ -71,7 +70,7 @@ public:
|
|||
|
||||
private slots:
|
||||
void saveImage(QPixmap pixmap, Common::UUID uuid);
|
||||
void showContextMenu(const QPoint &pos);
|
||||
void showContextMenu(const QPoint& pos);
|
||||
void DeleteUser(const int index);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
|
|
@ -11,12 +11,12 @@
|
|||
#include <QTimer>
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "qt_common/config/qt_config.h"
|
||||
#include "hid_core/frontend/emulated_controller.h"
|
||||
#include "hid_core/hid_core.h"
|
||||
#include "input_common/drivers/keyboard.h"
|
||||
#include "input_common/drivers/mouse.h"
|
||||
#include "input_common/main.h"
|
||||
#include "qt_common/config/qt_config.h"
|
||||
#include "ui_configure_ringcon.h"
|
||||
#include "yuzu/bootmanager.h"
|
||||
#include "yuzu/configuration/configure_ringcon.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "ui_configure_system.h"
|
||||
#include "qt_common/qt_compat.h"
|
||||
#include "ui_configure_system.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/configure_system.h"
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
|
|
@ -87,7 +87,8 @@ ConfigureSystem::ConfigureSystem(Core::System& system_,
|
|||
|
||||
connect(combo_language, qOverload<int>(&QComboBox::currentIndexChanged), this, locale_check);
|
||||
connect(combo_region, qOverload<int>(&QComboBox::currentIndexChanged), this, locale_check);
|
||||
connect(checkbox_rtc, qOverload<CHECKSTATE_TYPE>(&QCheckBox::STATE_CHANGED), this, update_rtc_date);
|
||||
connect(checkbox_rtc, qOverload<CHECKSTATE_TYPE>(&QCheckBox::STATE_CHANGED), this,
|
||||
update_rtc_date);
|
||||
connect(date_rtc_offset, qOverload<int>(&QSpinBox::valueChanged), this, update_rtc_date);
|
||||
connect(date_rtc, &QDateTimeEdit::dateTimeChanged, this, update_date_offset);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
#include "common/fs/fs.h"
|
||||
#include "common/fs/path_util.h"
|
||||
#include "common/settings.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure_tas.h"
|
||||
#include "yuzu/configuration/configure_tas.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
|
||||
ConfigureTasDialog::ConfigureTasDialog(QWidget* parent)
|
||||
: QDialog(parent), ui(std::make_unique<Ui::ConfigureTas>()) {
|
||||
|
|
@ -35,7 +35,8 @@ void ConfigureTasDialog::LoadConfiguration() {
|
|||
ui->tas_enable->setChecked(Settings::values.tas_enable.GetValue());
|
||||
ui->tas_loop_script->setChecked(Settings::values.tas_loop.GetValue());
|
||||
ui->tas_pause_on_load->setChecked(Settings::values.pause_tas_on_load.GetValue());
|
||||
ui->tas_show_recording_dialog->setChecked(Settings::values.tas_show_recording_dialog.GetValue());
|
||||
ui->tas_show_recording_dialog->setChecked(
|
||||
Settings::values.tas_show_recording_dialog.GetValue());
|
||||
}
|
||||
|
||||
void ConfigureTasDialog::ApplyConfiguration() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <QInputDialog>
|
||||
|
|
@ -548,9 +548,8 @@ bool TouchScreenPreview::eventFilter(QObject* obj, QEvent* event) {
|
|||
}
|
||||
const auto mouse_event = static_cast<QMouseEvent*>(event);
|
||||
if (!drag_state.active) {
|
||||
drag_state.active =
|
||||
(mouse_event->globalPosition().toPoint() - drag_state.start_pos).manhattanLength() >=
|
||||
QApplication::startDragDistance();
|
||||
drag_state.active = (mouse_event->globalPosition().toPoint() - drag_state.start_pos)
|
||||
.manhattanLength() >= QApplication::startDragDistance();
|
||||
if (!drag_state.active) {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
#include "core/frontend/framebuffer_layout.h"
|
||||
#include "ui_configure_ui.h"
|
||||
|
||||
#include "qt_common/qt_compat.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "qt_common/qt_compat.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2017 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "yuzu/configuration/configure_web.h"
|
||||
#include <QIcon>
|
||||
#include <QMessageBox>
|
||||
#include "yuzu/configuration/configure_web.h"
|
||||
|
||||
#if QT_VERSION_MAJOR >= 6
|
||||
#include <QRegularExpressionValidator>
|
||||
|
|
@ -16,28 +16,25 @@
|
|||
|
||||
#include <QtConcurrentRun>
|
||||
#include "common/settings.h"
|
||||
#include "ui_configure_web.h"
|
||||
#include "qt_common/config/uisettings.h"
|
||||
#include "ui_configure_web.h"
|
||||
|
||||
ConfigureWeb::ConfigureWeb(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(std::make_unique<Ui::ConfigureWeb>())
|
||||
, m_rng{QRandomGenerator::system()}
|
||||
{
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureWeb>()), m_rng{QRandomGenerator::system()} {
|
||||
ui->setupUi(this);
|
||||
|
||||
QString user_regex = QStringLiteral(".{4,20}");
|
||||
QString token_regex = QStringLiteral("[a-z]{48}");
|
||||
|
||||
#if QT_VERSION_MAJOR >= 6
|
||||
QRegularExpressionValidator *username_validator = new QRegularExpressionValidator(this);
|
||||
QRegularExpressionValidator *token_validator = new QRegularExpressionValidator(this);
|
||||
QRegularExpressionValidator* username_validator = new QRegularExpressionValidator(this);
|
||||
QRegularExpressionValidator* token_validator = new QRegularExpressionValidator(this);
|
||||
|
||||
username_validator->setRegularExpression(QRegularExpression(user_regex));
|
||||
token_validator->setRegularExpression(QRegularExpression(token_regex));
|
||||
#else
|
||||
QRegExpValidator *username_validator = new QRegExpValidator(this);
|
||||
QRegExpValidator *token_validator = new QRegExpValidator(this);
|
||||
QRegExpValidator* username_validator = new QRegExpValidator(this);
|
||||
QRegExpValidator* token_validator = new QRegExpValidator(this);
|
||||
|
||||
username_validator->setRegExp(QRegExp(user_regex));
|
||||
token_validator->setRegExp(QRegExp(token_regex));
|
||||
|
|
@ -121,7 +118,8 @@ void ConfigureWeb::VerifyLogin() {
|
|||
ui->label_token_verified->setToolTip(tr("All Good", "Tooltip"));
|
||||
} else {
|
||||
ui->label_token_verified->setPixmap(failed);
|
||||
ui->label_token_verified->setToolTip(tr("Must be 48 characters, and lowercase a-z", "Tooltip"));
|
||||
ui->label_token_verified->setToolTip(
|
||||
tr("Must be 48 characters, and lowercase a-z", "Tooltip"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2017 Citra Emulator Project
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include <QRandomGenerator>
|
||||
|
||||
#include <QWidget>
|
||||
#include <memory>
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class ConfigureWeb;
|
||||
|
|
@ -32,7 +32,7 @@ private:
|
|||
void SetConfiguration();
|
||||
|
||||
std::unique_ptr<Ui::ConfigureWeb> ui;
|
||||
QRandomGenerator *m_rng;
|
||||
QRandomGenerator* m_rng;
|
||||
|
||||
private slots:
|
||||
void GenerateToken();
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
#include "common/logging/log.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/settings_common.h"
|
||||
#include "qt_common/qt_compat.h"
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
#include "qt_common/qt_compat.h"
|
||||
|
||||
namespace ConfigurationShared {
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ QWidget* Widget::CreateCombobox(std::function<std::string()>& serializer,
|
|||
|
||||
if (!Settings::IsConfiguringGlobal()) {
|
||||
combobox->connect(combobox, QOverload<int>::of(&QComboBox::activated),
|
||||
[touch]() { touch(); });
|
||||
[touch]() { touch(); });
|
||||
}
|
||||
|
||||
return combobox;
|
||||
|
|
@ -413,13 +413,13 @@ QWidget* Widget::CreateDoubleSpinBox(const QString& given_suffix,
|
|||
};
|
||||
|
||||
if (!Settings::IsConfiguringGlobal()) {
|
||||
double_spinbox->connect(double_spinbox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
[this, touch]() {
|
||||
if (double_spinbox->value() !=
|
||||
std::strtod(setting.ToStringGlobal().c_str(), nullptr)) {
|
||||
touch();
|
||||
}
|
||||
});
|
||||
double_spinbox->connect(
|
||||
double_spinbox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [this, touch]() {
|
||||
if (double_spinbox->value() !=
|
||||
std::strtod(setting.ToStringGlobal().c_str(), nullptr)) {
|
||||
touch();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return double_spinbox;
|
||||
|
|
@ -491,11 +491,11 @@ QWidget* Widget::CreateDateTimeEdit(bool disabled, bool restrict,
|
|||
|
||||
if (!Settings::IsConfiguringGlobal()) {
|
||||
date_time_edit->connect(date_time_edit, &QDateTimeEdit::editingFinished,
|
||||
[this, get_clear_val, touch]() {
|
||||
if (date_time_edit->dateTime() != get_clear_val()) {
|
||||
touch();
|
||||
}
|
||||
});
|
||||
[this, get_clear_val, touch]() {
|
||||
if (date_time_edit->dateTime() != get_clear_val()) {
|
||||
touch();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return date_time_edit;
|
||||
|
|
@ -570,7 +570,8 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
|
|||
}
|
||||
|
||||
if (require_checkbox) {
|
||||
QWidget* lhs = CreateCheckBox(other_setting, label, checkbox_serializer, checkbox_restore_func, touch);
|
||||
QWidget* lhs =
|
||||
CreateCheckBox(other_setting, label, checkbox_serializer, checkbox_restore_func, touch);
|
||||
layout->addWidget(lhs, 1);
|
||||
} else if (type_id != "bool") {
|
||||
QLabel* qt_label = CreateLabel(label);
|
||||
|
|
@ -665,16 +666,16 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu
|
|||
layout->addWidget(restore_button);
|
||||
|
||||
restore_button->connect(restore_button, &QAbstractButton::clicked,
|
||||
[this, restore_func, checkbox_restore_func](bool) {
|
||||
LOG_DEBUG(Frontend, "Restore global state for \"{}\"",
|
||||
setting.GetLabel());
|
||||
[this, restore_func, checkbox_restore_func](bool) {
|
||||
LOG_DEBUG(Frontend, "Restore global state for \"{}\"",
|
||||
setting.GetLabel());
|
||||
|
||||
restore_button->setEnabled(false);
|
||||
restore_button->setVisible(false);
|
||||
restore_button->setEnabled(false);
|
||||
restore_button->setVisible(false);
|
||||
|
||||
checkbox_restore_func();
|
||||
restore_func();
|
||||
});
|
||||
checkbox_restore_func();
|
||||
restore_func();
|
||||
});
|
||||
|
||||
load_func = [this, serializer, require_checkbox, checkbox_serializer, other_setting]() {
|
||||
bool using_global = !restore_button->isEnabled();
|
||||
|
|
@ -766,8 +767,8 @@ Widget::Widget(Settings::BasicSetting* setting_, const TranslationMap& translati
|
|||
|
||||
Builder::Builder(QWidget* parent_, bool runtime_lock_)
|
||||
: translations{InitializeTranslations(parent_)},
|
||||
combobox_translations{ComboboxEnumeration(parent_)}, parent{parent_}, runtime_lock{
|
||||
runtime_lock_} {}
|
||||
combobox_translations{ComboboxEnumeration(parent_)}, parent{parent_},
|
||||
runtime_lock{runtime_lock_} {}
|
||||
|
||||
Builder::~Builder() = default;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
|
|
@ -10,10 +10,10 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QStringLiteral>
|
||||
#include <QWidget>
|
||||
#include <QObject>
|
||||
#include <qobjectdefs.h>
|
||||
#include "qt_common/config/shared_translation.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@ struct User {
|
|||
QPixmap pixmap;
|
||||
};
|
||||
|
||||
class NewUserDialog : public QDialog
|
||||
{
|
||||
class NewUserDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool isDefaultAvatar READ isDefaultAvatar WRITE setIsDefaultAvatar NOTIFY
|
||||
isDefaultAvatarChanged FINAL)
|
||||
|
||||
public:
|
||||
explicit NewUserDialog(QWidget *parent = nullptr);
|
||||
explicit NewUserDialog(Common::UUID uuid, const std::string &username, const QString &title, QWidget *parent = nullptr);
|
||||
explicit NewUserDialog(QWidget* parent = nullptr);
|
||||
explicit NewUserDialog(Common::UUID uuid, const std::string& username, const QString& title,
|
||||
QWidget* parent = nullptr);
|
||||
~NewUserDialog();
|
||||
|
||||
bool isDefaultAvatar() const;
|
||||
|
|
@ -39,8 +39,8 @@ public:
|
|||
static QPixmap DefaultAvatar();
|
||||
|
||||
private:
|
||||
Ui::NewUserDialog *ui;
|
||||
QGraphicsScene *m_scene;
|
||||
Ui::NewUserDialog* ui;
|
||||
QGraphicsScene* m_scene;
|
||||
QPixmap m_pixmap;
|
||||
|
||||
ProfileAvatarDialog* avatar_dialog;
|
||||
|
|
@ -48,12 +48,12 @@ private:
|
|||
bool m_isDefaultAvatar = true;
|
||||
bool m_editing = false;
|
||||
|
||||
void setup(Common::UUID uuid, const std::string &username, const QString &title);
|
||||
void setup(Common::UUID uuid, const std::string& username, const QString& title);
|
||||
bool LoadAvatarData();
|
||||
std::vector<uint8_t> DecompressYaz0(const FileSys::VirtualFile& file);
|
||||
|
||||
public slots:
|
||||
void setImage(const QPixmap &pixmap);
|
||||
void setImage(const QPixmap& pixmap);
|
||||
void selectImage();
|
||||
void setAvatar();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue