early-access version 3772
This commit is contained in:
parent
76d5acebd0
commit
469ff3fe83
@ -1,7 +1,7 @@
|
||||
yuzu emulator early access
|
||||
=============
|
||||
|
||||
This is the source code for early-access 3770.
|
||||
This is the source code for early-access 3772.
|
||||
|
||||
## Legal Notice
|
||||
|
||||
|
@ -449,7 +449,7 @@ private:
|
||||
loader->ReadTitle(entry.title);
|
||||
loader->ReadIcon(entry.icon);
|
||||
if (loader->GetFileType() == Loader::FileType::NRO) {
|
||||
jauto loader_nro = dynamic_cast<Loader::AppLoader_NRO*>(loader.get());
|
||||
jauto loader_nro = reinterpret_cast<Loader::AppLoader_NRO*>(loader.get());
|
||||
entry.isHomebrew = loader_nro->IsHomebrew();
|
||||
} else {
|
||||
entry.isHomebrew = false;
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include <compare>
|
||||
#include <cstddef>
|
||||
#include <filesystem>
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -346,11 +346,11 @@ void ARM_Dynarmic_32::RewindBreakpointInstruction() {
|
||||
}
|
||||
|
||||
ARM_Dynarmic_32::ARM_Dynarmic_32(System& system_, bool uses_wall_clock_,
|
||||
ExclusiveMonitor& exclusive_monitor_, std::size_t core_index_)
|
||||
DynarmicExclusiveMonitor& exclusive_monitor_,
|
||||
std::size_t core_index_)
|
||||
: ARM_Interface{system_, uses_wall_clock_}, cb(std::make_unique<DynarmicCallbacks32>(*this)),
|
||||
cp15(std::make_shared<DynarmicCP15>(*this)), core_index{core_index_},
|
||||
exclusive_monitor{dynamic_cast<DynarmicExclusiveMonitor&>(exclusive_monitor_)},
|
||||
null_jit{MakeJit(nullptr)}, jit{null_jit.get()} {}
|
||||
exclusive_monitor{exclusive_monitor_}, null_jit{MakeJit(nullptr)}, jit{null_jit.get()} {}
|
||||
|
||||
ARM_Dynarmic_32::~ARM_Dynarmic_32() = default;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "common/common_types.h"
|
||||
#include "common/hash.h"
|
||||
#include "core/arm/arm_interface.h"
|
||||
#include "core/arm/exclusive_monitor.h"
|
||||
#include "core/arm/dynarmic/dynarmic_exclusive_monitor.h"
|
||||
|
||||
namespace Core::Memory {
|
||||
class Memory;
|
||||
@ -28,8 +28,8 @@ class System;
|
||||
|
||||
class ARM_Dynarmic_32 final : public ARM_Interface {
|
||||
public:
|
||||
ARM_Dynarmic_32(System& system_, bool uses_wall_clock_, ExclusiveMonitor& exclusive_monitor_,
|
||||
std::size_t core_index_);
|
||||
ARM_Dynarmic_32(System& system_, bool uses_wall_clock_,
|
||||
DynarmicExclusiveMonitor& exclusive_monitor_, std::size_t core_index_);
|
||||
~ARM_Dynarmic_32() override;
|
||||
|
||||
void SetPC(u64 pc) override;
|
||||
|
@ -405,11 +405,11 @@ void ARM_Dynarmic_64::RewindBreakpointInstruction() {
|
||||
}
|
||||
|
||||
ARM_Dynarmic_64::ARM_Dynarmic_64(System& system_, bool uses_wall_clock_,
|
||||
ExclusiveMonitor& exclusive_monitor_, std::size_t core_index_)
|
||||
DynarmicExclusiveMonitor& exclusive_monitor_,
|
||||
std::size_t core_index_)
|
||||
: ARM_Interface{system_, uses_wall_clock_},
|
||||
cb(std::make_unique<DynarmicCallbacks64>(*this)), core_index{core_index_},
|
||||
exclusive_monitor{dynamic_cast<DynarmicExclusiveMonitor&>(exclusive_monitor_)},
|
||||
null_jit{MakeJit(nullptr, 48)}, jit{null_jit.get()} {}
|
||||
exclusive_monitor{exclusive_monitor_}, null_jit{MakeJit(nullptr, 48)}, jit{null_jit.get()} {}
|
||||
|
||||
ARM_Dynarmic_64::~ARM_Dynarmic_64() = default;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "common/common_types.h"
|
||||
#include "common/hash.h"
|
||||
#include "core/arm/arm_interface.h"
|
||||
#include "core/arm/exclusive_monitor.h"
|
||||
#include "core/arm/dynarmic/dynarmic_exclusive_monitor.h"
|
||||
|
||||
namespace Core::Memory {
|
||||
class Memory;
|
||||
@ -25,8 +25,8 @@ class System;
|
||||
|
||||
class ARM_Dynarmic_64 final : public ARM_Interface {
|
||||
public:
|
||||
ARM_Dynarmic_64(System& system_, bool uses_wall_clock_, ExclusiveMonitor& exclusive_monitor_,
|
||||
std::size_t core_index_);
|
||||
ARM_Dynarmic_64(System& system_, bool uses_wall_clock_,
|
||||
DynarmicExclusiveMonitor& exclusive_monitor_, std::size_t core_index_);
|
||||
~ARM_Dynarmic_64() override;
|
||||
|
||||
void SetPC(u64 pc) override;
|
||||
|
@ -6,8 +6,6 @@
|
||||
#include <dynarmic/interface/exclusive_monitor.h>
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "core/arm/dynarmic/arm_dynarmic_32.h"
|
||||
#include "core/arm/dynarmic/arm_dynarmic_64.h"
|
||||
#include "core/arm/exclusive_monitor.h"
|
||||
|
||||
namespace Core::Memory {
|
||||
@ -16,6 +14,9 @@ class Memory;
|
||||
|
||||
namespace Core {
|
||||
|
||||
class ARM_Dynarmic_32;
|
||||
class ARM_Dynarmic_64;
|
||||
|
||||
class DynarmicExclusiveMonitor final : public ExclusiveMonitor {
|
||||
public:
|
||||
explicit DynarmicExclusiveMonitor(Memory::Memory& memory_, std::size_t core_count_);
|
||||
|
@ -890,6 +890,14 @@ const FileSys::ContentProvider& System::GetContentProvider() const {
|
||||
return *impl->content_provider;
|
||||
}
|
||||
|
||||
FileSys::ContentProviderUnion& System::GetContentProviderUnion() {
|
||||
return *impl->content_provider;
|
||||
}
|
||||
|
||||
const FileSys::ContentProviderUnion& System::GetContentProviderUnion() const {
|
||||
return *impl->content_provider;
|
||||
}
|
||||
|
||||
Service::FileSystem::FileSystemController& System::GetFileSystemController() {
|
||||
return impl->fs_controller;
|
||||
}
|
||||
|
@ -381,6 +381,9 @@ public:
|
||||
[[nodiscard]] FileSys::ContentProvider& GetContentProvider();
|
||||
[[nodiscard]] const FileSys::ContentProvider& GetContentProvider() const;
|
||||
|
||||
[[nodiscard]] FileSys::ContentProviderUnion& GetContentProviderUnion();
|
||||
[[nodiscard]] const FileSys::ContentProviderUnion& GetContentProviderUnion() const;
|
||||
|
||||
[[nodiscard]] Service::FileSystem::FileSystemController& GetFileSystemController();
|
||||
[[nodiscard]] const Service::FileSystem::FileSystemController& GetFileSystemController() const;
|
||||
|
||||
|
@ -17,7 +17,9 @@ PhysicalCore::PhysicalCore(std::size_t core_index, Core::System& system, KSchedu
|
||||
// a 32-bit instance of Dynarmic. This should be abstracted out to a CPU manager.
|
||||
auto& kernel = system.Kernel();
|
||||
m_arm_interface = std::make_unique<Core::ARM_Dynarmic_64>(
|
||||
system, kernel.IsMulticore(), kernel.GetExclusiveMonitor(), m_core_index);
|
||||
system, kernel.IsMulticore(),
|
||||
reinterpret_cast<Core::DynarmicExclusiveMonitor&>(kernel.GetExclusiveMonitor()),
|
||||
m_core_index);
|
||||
#else
|
||||
#error Platform not supported yet.
|
||||
#endif
|
||||
@ -31,7 +33,9 @@ void PhysicalCore::Initialize(bool is_64_bit) {
|
||||
if (!is_64_bit) {
|
||||
// We already initialized a 64-bit core, replace with a 32-bit one.
|
||||
m_arm_interface = std::make_unique<Core::ARM_Dynarmic_32>(
|
||||
m_system, kernel.IsMulticore(), kernel.GetExclusiveMonitor(), m_core_index);
|
||||
m_system, kernel.IsMulticore(),
|
||||
reinterpret_cast<Core::DynarmicExclusiveMonitor&>(kernel.GetExclusiveMonitor()),
|
||||
m_core_index);
|
||||
}
|
||||
#else
|
||||
#error Platform not supported yet.
|
||||
|
@ -3,13 +3,14 @@
|
||||
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
|
||||
namespace ConfigurationShared {
|
||||
|
||||
Tab::Tab(std::shared_ptr<std::forward_list<Tab*>> group, QWidget* parent) : QWidget(parent) {
|
||||
Tab::Tab(std::shared_ptr<std::vector<Tab*>> group, QWidget* parent) : QWidget(parent) {
|
||||
if (group != nullptr) {
|
||||
group->push_front(this);
|
||||
group->push_back(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <forward_list>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <qobjectdefs.h>
|
||||
@ -17,7 +17,7 @@ class Tab : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Tab(std::shared_ptr<std::forward_list<Tab*>> group, QWidget* parent = nullptr);
|
||||
explicit Tab(std::shared_ptr<std::vector<Tab*>> group, QWidget* parent = nullptr);
|
||||
~Tab();
|
||||
|
||||
virtual void ApplyConfiguration() = 0;
|
||||
|
@ -1,8 +1,8 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <forward_list>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QComboBox>
|
||||
|
||||
#include "audio_core/sink/sink.h"
|
||||
@ -17,7 +17,7 @@
|
||||
#include "yuzu/uisettings.h"
|
||||
|
||||
ConfigureAudio::ConfigureAudio(const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group_,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent)
|
||||
: Tab(group_, parent), ui(std::make_unique<Ui::ConfigureAudio>()), system{system_} {
|
||||
ui->setupUi(this);
|
||||
@ -31,11 +31,11 @@ ConfigureAudio::~ConfigureAudio() = default;
|
||||
void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) {
|
||||
auto& layout = *ui->audio_widget->layout();
|
||||
|
||||
std::forward_list<Settings::BasicSetting*> settings;
|
||||
std::vector<Settings::BasicSetting*> settings;
|
||||
|
||||
auto push = [&](Settings::Category category) {
|
||||
for (auto* setting : Settings::values.linkage.by_category[category]) {
|
||||
settings.push_front(setting);
|
||||
settings.push_back(setting);
|
||||
}
|
||||
};
|
||||
|
||||
@ -49,7 +49,7 @@ void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) {
|
||||
continue;
|
||||
}
|
||||
if (!widget->Valid()) {
|
||||
delete widget;
|
||||
widget->deleteLater();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QWidget>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
|
||||
@ -26,7 +26,7 @@ class Builder;
|
||||
class ConfigureAudio : public ConfigurationShared::Tab {
|
||||
public:
|
||||
explicit ConfigureAudio(const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent = nullptr);
|
||||
~ConfigureAudio() override;
|
||||
|
||||
@ -51,7 +51,7 @@ private:
|
||||
|
||||
const Core::System& system;
|
||||
|
||||
std::forward_list<std::function<void(bool)>> apply_funcs{};
|
||||
std::vector<std::function<void(bool)>> apply_funcs{};
|
||||
|
||||
QComboBox* sink_combo_box;
|
||||
QComboBox* output_device_combo_box;
|
||||
|
@ -1,9 +1,9 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <forward_list>
|
||||
#include <memory>
|
||||
#include <typeinfo>
|
||||
#include <vector>
|
||||
#include <QComboBox>
|
||||
#include "common/common_types.h"
|
||||
#include "common/settings.h"
|
||||
@ -15,7 +15,7 @@
|
||||
#include "yuzu/configuration/configure_cpu.h"
|
||||
|
||||
ConfigureCpu::ConfigureCpu(const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group_,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent)
|
||||
: Tab(group_, parent), ui{std::make_unique<Ui::ConfigureCpu>()}, system{system_},
|
||||
combobox_translations(builder.ComboboxTranslations()) {
|
||||
@ -37,10 +37,10 @@ void ConfigureCpu::Setup(const ConfigurationShared::Builder& builder) {
|
||||
auto* unsafe_layout = ui->unsafe_widget->layout();
|
||||
std::map<std::string, QWidget*> unsafe_hold{};
|
||||
|
||||
std::forward_list<Settings::BasicSetting*> settings;
|
||||
std::vector<Settings::BasicSetting*> settings;
|
||||
const auto push = [&](Settings::Category category) {
|
||||
for (const auto setting : Settings::values.linkage.by_category[category]) {
|
||||
settings.push_front(setting);
|
||||
settings.push_back(setting);
|
||||
}
|
||||
};
|
||||
|
||||
@ -54,7 +54,7 @@ void ConfigureCpu::Setup(const ConfigurationShared::Builder& builder) {
|
||||
continue;
|
||||
}
|
||||
if (!widget->Valid()) {
|
||||
delete widget;
|
||||
widget->deleteLater();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QWidget>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/shared_translation.h"
|
||||
@ -25,7 +26,7 @@ class Builder;
|
||||
class ConfigureCpu : public ConfigurationShared::Tab {
|
||||
public:
|
||||
explicit ConfigureCpu(const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent = nullptr);
|
||||
~ConfigureCpu() override;
|
||||
|
||||
@ -45,7 +46,7 @@ private:
|
||||
const Core::System& system;
|
||||
|
||||
const ConfigurationShared::ComboboxTranslationMap& combobox_translations;
|
||||
std::forward_list<std::function<void(bool)>> apply_funcs{};
|
||||
std::vector<std::function<void(bool)>> apply_funcs{};
|
||||
|
||||
QComboBox* accuracy_combobox;
|
||||
};
|
||||
|
@ -97,6 +97,9 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
||||
|
||||
adjustSize();
|
||||
ui->selectorList->setCurrentRow(0);
|
||||
|
||||
// Selects the leftmost button on the bottom bar (Cancel as of writing)
|
||||
ui->buttonBox->setFocus();
|
||||
}
|
||||
|
||||
ConfigureDialog::~ConfigureDialog() = default;
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <forward_list>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QDialog>
|
||||
@ -74,7 +73,7 @@ private:
|
||||
|
||||
Core::System& system;
|
||||
std::unique_ptr<ConfigurationShared::Builder> builder;
|
||||
std::forward_list<ConfigurationShared::Tab*> tab_group;
|
||||
std::vector<ConfigurationShared::Tab*> tab_group;
|
||||
|
||||
std::unique_ptr<ConfigureAudio> audio_tab;
|
||||
std::unique_ptr<ConfigureCpu> cpu_tab;
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <QMessageBox>
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
@ -12,10 +13,9 @@
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
#include "yuzu/uisettings.h"
|
||||
|
||||
ConfigureGeneral::ConfigureGeneral(
|
||||
const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group_,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent)
|
||||
ConfigureGeneral::ConfigureGeneral(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::ConfigureGeneral>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -48,7 +48,7 @@ void ConfigureGeneral::Setup(const ConfigurationShared::Builder& builder) {
|
||||
continue;
|
||||
}
|
||||
if (!widget->Valid()) {
|
||||
delete widget;
|
||||
widget->deleteLater();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QWidget>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
|
||||
@ -26,7 +27,7 @@ class Builder;
|
||||
class ConfigureGeneral : public ConfigurationShared::Tab {
|
||||
public:
|
||||
explicit ConfigureGeneral(const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
|
||||
const ConfigurationShared::Builder& builder,
|
||||
QWidget* parent = nullptr);
|
||||
~ConfigureGeneral() override;
|
||||
@ -46,7 +47,7 @@ private:
|
||||
|
||||
std::unique_ptr<Ui::ConfigureGeneral> ui;
|
||||
|
||||
std::forward_list<std::function<void(bool)>> apply_funcs{};
|
||||
std::vector<std::function<void(bool)>> apply_funcs{};
|
||||
|
||||
const Core::System& system;
|
||||
};
|
||||
|
@ -77,11 +77,11 @@ static constexpr Settings::VSyncMode PresentModeToSetting(VkPresentModeKHR mode)
|
||||
}
|
||||
}
|
||||
|
||||
ConfigureGraphics::ConfigureGraphics(
|
||||
const Core::System& system_, std::vector<VkDeviceInfo::Record>& records_,
|
||||
const std::function<void()>& expose_compute_option_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group_,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent)
|
||||
ConfigureGraphics::ConfigureGraphics(const Core::System& system_,
|
||||
std::vector<VkDeviceInfo::Record>& records_,
|
||||
const std::function<void()>& expose_compute_option_,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent)
|
||||
: ConfigurationShared::Tab(group_, parent), ui{std::make_unique<Ui::ConfigureGraphics>()},
|
||||
records{records_}, expose_compute_option{expose_compute_option_}, system{system_},
|
||||
combobox_translations{builder.ComboboxTranslations()},
|
||||
@ -228,7 +228,7 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) {
|
||||
QLayout& graphics_layout = *ui->graphics_widget->layout();
|
||||
|
||||
std::map<u32, QWidget*> hold_graphics;
|
||||
std::forward_list<QWidget*> hold_api;
|
||||
std::vector<QWidget*> hold_api;
|
||||
|
||||
for (const auto setting : Settings::values.linkage.by_category[Settings::Category::Renderer]) {
|
||||
ConfigurationShared::Widget* widget = [&]() {
|
||||
@ -246,7 +246,7 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) {
|
||||
continue;
|
||||
}
|
||||
if (!widget->Valid()) {
|
||||
delete widget;
|
||||
widget->deleteLater();
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -268,12 +268,12 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) {
|
||||
}
|
||||
} else if (setting->Id() == Settings::values.vulkan_device.Id()) {
|
||||
// Keep track of vulkan_device's combobox so we can populate it
|
||||
hold_api.push_front(widget);
|
||||
hold_api.push_back(widget);
|
||||
vulkan_device_combobox = widget->combobox;
|
||||
vulkan_device_widget = widget;
|
||||
} else if (setting->Id() == Settings::values.shader_backend.Id()) {
|
||||
// Keep track of shader_backend's combobox so we can populate it
|
||||
hold_api.push_front(widget);
|
||||
hold_api.push_back(widget);
|
||||
shader_backend_combobox = widget->combobox;
|
||||
shader_backend_widget = widget;
|
||||
} else if (setting->Id() == Settings::values.vsync_mode.Id()) {
|
||||
@ -296,7 +296,7 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) {
|
||||
// Background color is too specific to build into the new system, so we manage it here
|
||||
// (3 settings, all collected into a single widget with a QColor to manage on top)
|
||||
if (Settings::IsConfiguringGlobal()) {
|
||||
apply_funcs.push_front([this](bool powered_on) {
|
||||
apply_funcs.push_back([this](bool powered_on) {
|
||||
Settings::values.bg_red.SetValue(static_cast<u8>(bg_color.red()));
|
||||
Settings::values.bg_green.SetValue(static_cast<u8>(bg_color.green()));
|
||||
Settings::values.bg_blue.SetValue(static_cast<u8>(bg_color.blue()));
|
||||
@ -322,7 +322,7 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) {
|
||||
bg_restore_button->setEnabled(true);
|
||||
});
|
||||
|
||||
apply_funcs.push_front([bg_restore_button, this](bool powered_on) {
|
||||
apply_funcs.push_back([bg_restore_button, this](bool powered_on) {
|
||||
const bool using_global = !bg_restore_button->isEnabled();
|
||||
Settings::values.bg_red.SetGlobal(using_global);
|
||||
Settings::values.bg_green.SetGlobal(using_global);
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
explicit ConfigureGraphics(const Core::System& system_,
|
||||
std::vector<VkDeviceInfo::Record>& records,
|
||||
const std::function<void()>& expose_compute_option_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
|
||||
const ConfigurationShared::Builder& builder,
|
||||
QWidget* parent = nullptr);
|
||||
~ConfigureGraphics() override;
|
||||
@ -80,7 +80,7 @@ private:
|
||||
std::unique_ptr<Ui::ConfigureGraphics> ui;
|
||||
QColor bg_color;
|
||||
|
||||
std::forward_list<std::function<void(bool)>> apply_funcs{};
|
||||
std::vector<std::function<void(bool)>> apply_funcs{};
|
||||
|
||||
std::vector<VkDeviceInfo::Record>& records;
|
||||
std::vector<QString> vulkan_devices;
|
||||
|
@ -1,6 +1,7 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <vector>
|
||||
#include <QLabel>
|
||||
#include <qnamespace.h>
|
||||
#include "common/settings.h"
|
||||
@ -12,8 +13,7 @@
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
|
||||
ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced(
|
||||
const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group_,
|
||||
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::ConfigureGraphicsAdvanced>()}, system{system_} {
|
||||
|
||||
@ -42,7 +42,7 @@ void ConfigureGraphicsAdvanced::Setup(const ConfigurationShared::Builder& builde
|
||||
continue;
|
||||
}
|
||||
if (!widget->Valid()) {
|
||||
delete widget;
|
||||
widget->deleteLater();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QWidget>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
|
||||
@ -22,8 +23,7 @@ class Builder;
|
||||
class ConfigureGraphicsAdvanced : public ConfigurationShared::Tab {
|
||||
public:
|
||||
explicit ConfigureGraphicsAdvanced(
|
||||
const Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||
const Core::System& system_, std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent = nullptr);
|
||||
~ConfigureGraphicsAdvanced() override;
|
||||
|
||||
@ -41,7 +41,7 @@ private:
|
||||
|
||||
const Core::System& system;
|
||||
|
||||
std::forward_list<std::function<void(bool)>> apply_funcs;
|
||||
std::vector<std::function<void(bool)>> apply_funcs;
|
||||
|
||||
QWidget* checkbox_enable_compute_pipelines{};
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
|
||||
: 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::forward_list<ConfigurationShared::Tab*>>()} {
|
||||
tab_group{std::make_shared<std::vector<ConfigurationShared::Tab*>>()} {
|
||||
const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name));
|
||||
const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename())
|
||||
: fmt::format("{:016X}", title_id);
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <forward_list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -77,7 +76,7 @@ private:
|
||||
|
||||
Core::System& system;
|
||||
std::unique_ptr<ConfigurationShared::Builder> builder;
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> tab_group;
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> tab_group;
|
||||
|
||||
std::unique_ptr<ConfigurePerGameAddons> addons_tab;
|
||||
std::unique_ptr<ConfigureAudio> audio_tab;
|
||||
|
@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <chrono>
|
||||
#include <forward_list>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
@ -44,9 +44,9 @@ static bool IsValidLocale(u32 region_index, u32 language_index) {
|
||||
return ((LOCALE_BLOCKLIST.at(region_index) >> language_index) & 1) == 0;
|
||||
}
|
||||
|
||||
ConfigureSystem::ConfigureSystem(
|
||||
Core::System& system_, std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group_,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent)
|
||||
ConfigureSystem::ConfigureSystem(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::ConfigureSystem>()}, system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -95,10 +95,10 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) {
|
||||
std::map<u32, QWidget*> core_hold{};
|
||||
std::map<u32, QWidget*> system_hold{};
|
||||
|
||||
std::forward_list<Settings::BasicSetting*> settings;
|
||||
std::vector<Settings::BasicSetting*> settings;
|
||||
auto push = [&settings](auto& list) {
|
||||
for (auto setting : list) {
|
||||
settings.push_front(setting);
|
||||
settings.push_back(setting);
|
||||
}
|
||||
};
|
||||
|
||||
@ -112,7 +112,7 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) {
|
||||
continue;
|
||||
}
|
||||
if (!widget->Valid()) {
|
||||
delete widget;
|
||||
widget->deleteLater();
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) {
|
||||
system_hold.emplace(setting->Id(), widget);
|
||||
break;
|
||||
default:
|
||||
delete widget;
|
||||
widget->deleteLater();
|
||||
}
|
||||
}
|
||||
for (const auto& [label, widget] : core_hold) {
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <QWidget>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
@ -29,7 +29,7 @@ class Builder;
|
||||
class ConfigureSystem : public ConfigurationShared::Tab {
|
||||
public:
|
||||
explicit ConfigureSystem(Core::System& system_,
|
||||
std::shared_ptr<std::forward_list<ConfigurationShared::Tab*>> group,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
|
||||
const ConfigurationShared::Builder& builder,
|
||||
QWidget* parent = nullptr);
|
||||
~ConfigureSystem() override;
|
||||
@ -43,7 +43,7 @@ private:
|
||||
|
||||
void Setup(const ConfigurationShared::Builder& builder);
|
||||
|
||||
std::forward_list<std::function<void(bool)>> apply_funcs{};
|
||||
std::vector<std::function<void(bool)>> apply_funcs{};
|
||||
|
||||
std::unique_ptr<Ui::ConfigureSystem> ui;
|
||||
bool enabled = false;
|
||||
|
@ -547,7 +547,7 @@ Widget::~Widget() = default;
|
||||
|
||||
Widget::Widget(Settings::BasicSetting* setting_, const TranslationMap& translations_,
|
||||
const ComboboxTranslationMap& combobox_translations_, QWidget* parent_,
|
||||
bool runtime_lock_, std::forward_list<std::function<void(bool)>>& apply_funcs_,
|
||||
bool runtime_lock_, std::vector<std::function<void(bool)>>& apply_funcs_,
|
||||
RequestType request, bool managed, float multiplier,
|
||||
Settings::BasicSetting* other_setting, const QString& suffix)
|
||||
: QWidget(parent_), parent{parent_}, translations{translations_},
|
||||
@ -584,7 +584,7 @@ Widget::Widget(Settings::BasicSetting* setting_, const TranslationMap& translati
|
||||
return;
|
||||
}
|
||||
|
||||
apply_funcs.push_front([load_func, setting_](bool powered_on) {
|
||||
apply_funcs.push_back([load_func, setting_](bool powered_on) {
|
||||
if (setting_->RuntimeModfiable() || !powered_on) {
|
||||
load_func();
|
||||
}
|
||||
@ -607,7 +607,7 @@ Builder::Builder(QWidget* parent_, bool runtime_lock_)
|
||||
Builder::~Builder() = default;
|
||||
|
||||
Widget* Builder::BuildWidget(Settings::BasicSetting* setting,
|
||||
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
||||
std::vector<std::function<void(bool)>>& apply_funcs,
|
||||
RequestType request, bool managed, float multiplier,
|
||||
Settings::BasicSetting* other_setting, const QString& suffix) const {
|
||||
if (!Settings::IsConfiguringGlobal() && !setting->Switchable()) {
|
||||
@ -624,7 +624,7 @@ Widget* Builder::BuildWidget(Settings::BasicSetting* setting,
|
||||
}
|
||||
|
||||
Widget* Builder::BuildWidget(Settings::BasicSetting* setting,
|
||||
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
||||
std::vector<std::function<void(bool)>>& apply_funcs,
|
||||
Settings::BasicSetting* other_setting, RequestType request,
|
||||
const QString& suffix) const {
|
||||
return BuildWidget(setting, apply_funcs, request, true, 1.0f, other_setting, suffix);
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <QString>
|
||||
#include <QStringLiteral>
|
||||
#include <QWidget>
|
||||
@ -62,7 +62,7 @@ public:
|
||||
*/
|
||||
explicit Widget(Settings::BasicSetting* setting, const TranslationMap& translations,
|
||||
const ComboboxTranslationMap& combobox_translations, QWidget* parent,
|
||||
bool runtime_lock, std::forward_list<std::function<void(bool)>>& apply_funcs_,
|
||||
bool runtime_lock, std::vector<std::function<void(bool)>>& apply_funcs_,
|
||||
RequestType request = RequestType::Default, bool managed = true,
|
||||
float multiplier = 1.0f, Settings::BasicSetting* other_setting = nullptr,
|
||||
const QString& suffix = QStringLiteral(""));
|
||||
@ -125,7 +125,7 @@ private:
|
||||
const TranslationMap& translations;
|
||||
const ComboboxTranslationMap& combobox_enumerations;
|
||||
Settings::BasicSetting& setting;
|
||||
std::forward_list<std::function<void(bool)>>& apply_funcs;
|
||||
std::vector<std::function<void(bool)>>& apply_funcs;
|
||||
|
||||
bool created{false};
|
||||
bool runtime_lock{false};
|
||||
@ -137,13 +137,13 @@ public:
|
||||
~Builder();
|
||||
|
||||
Widget* BuildWidget(Settings::BasicSetting* setting,
|
||||
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
||||
std::vector<std::function<void(bool)>>& apply_funcs,
|
||||
RequestType request = RequestType::Default, bool managed = true,
|
||||
float multiplier = 1.0f, Settings::BasicSetting* other_setting = nullptr,
|
||||
const QString& suffix = QStringLiteral("")) const;
|
||||
|
||||
Widget* BuildWidget(Settings::BasicSetting* setting,
|
||||
std::forward_list<std::function<void(bool)>>& apply_funcs,
|
||||
std::vector<std::function<void(bool)>>& apply_funcs,
|
||||
Settings::BasicSetting* other_setting,
|
||||
RequestType request = RequestType::Default,
|
||||
const QString& suffix = QStringLiteral("")) const;
|
||||
|
@ -235,7 +235,7 @@ GameListWorker::~GameListWorker() = default;
|
||||
void GameListWorker::AddTitlesToGameList(GameListDir* parent_dir) {
|
||||
using namespace FileSys;
|
||||
|
||||
const auto& cache = dynamic_cast<ContentProviderUnion&>(system.GetContentProvider());
|
||||
const auto& cache = system.GetContentProviderUnion();
|
||||
|
||||
auto installed_games = cache.ListEntriesFilterOrigin(std::nullopt, TitleType::Application,
|
||||
ContentRecordType::Program);
|
||||
|
Loading…
Reference in New Issue
Block a user