mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-06-06 01:13:45 -04:00
- Fast GPU now defaults to 256, removed 128 since it's useless. - Completely reorganized graphics and CPU settings on both platforms. Also got rid of Eden's Veil - Merged some "use ..." settings that weren't really necessary. - Changed ExtendedDynamicState to be a combo box Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3233 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
106 lines
3.3 KiB
C++
106 lines
3.3 KiB
C++
// SPDX-FileCopyrightText: Copyright 2025 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 "common/settings.h"
|
|
#include "core/core.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(
|
|
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_} {
|
|
|
|
ui->setupUi(this);
|
|
|
|
Setup(builder);
|
|
|
|
SetConfiguration();
|
|
|
|
checkbox_enable_compute_pipelines->setVisible(false);
|
|
}
|
|
|
|
ConfigureGraphicsAdvanced::~ConfigureGraphicsAdvanced() = default;
|
|
|
|
void ConfigureGraphicsAdvanced::SetConfiguration() {}
|
|
|
|
void ConfigureGraphicsAdvanced::Setup(const ConfigurationShared::Builder& builder) {
|
|
auto& normal_layout = *ui->normal_target->layout();
|
|
auto& hacks_layout = *ui->hacks_target->layout();
|
|
|
|
// A map will sort the data for us
|
|
std::map<u32, QWidget*> normal_hold{};
|
|
std::map<u32, QWidget*> hacks_hold{};
|
|
|
|
// These options are hacks and should probably be changed with caution.
|
|
// TODO(crueter) maybe make a separate category RendererHacks?
|
|
QList<u32> hacks = {
|
|
Settings::values.skip_cpu_inner_invalidation.Id(), Settings::values.async_presentation.Id(),
|
|
Settings::values.use_asynchronous_shaders.Id(), Settings::values.fast_gpu_time.Id()};
|
|
|
|
for (auto setting :
|
|
Settings::values.linkage.by_category[Settings::Category::RendererAdvanced]) {
|
|
ConfigurationShared::Widget* widget = builder.BuildWidget(setting, apply_funcs);
|
|
|
|
if (widget == nullptr) {
|
|
continue;
|
|
}
|
|
if (!widget->Valid()) {
|
|
widget->deleteLater();
|
|
continue;
|
|
}
|
|
|
|
const auto id = setting->Id();
|
|
|
|
if (hacks.contains(id)) {
|
|
hacks_hold.emplace(id, widget);
|
|
} else {
|
|
normal_hold.emplace(id, widget);
|
|
}
|
|
|
|
// Keep track of enable_compute_pipelines so we can display it when needed
|
|
if (setting->Id() == Settings::values.enable_compute_pipelines.Id()) {
|
|
checkbox_enable_compute_pipelines = widget;
|
|
}
|
|
}
|
|
|
|
for (const auto& [id, widget] : normal_hold) {
|
|
normal_layout.addWidget(widget);
|
|
}
|
|
|
|
for (const auto& [id, widget] : hacks_hold) {
|
|
hacks_layout.addWidget(widget);
|
|
}
|
|
}
|
|
|
|
void ConfigureGraphicsAdvanced::ApplyConfiguration() {
|
|
const bool is_powered_on = system.IsPoweredOn();
|
|
for (const auto& func : apply_funcs) {
|
|
func(is_powered_on);
|
|
}
|
|
}
|
|
|
|
void ConfigureGraphicsAdvanced::changeEvent(QEvent* event) {
|
|
if (event->type() == QEvent::LanguageChange) {
|
|
RetranslateUI();
|
|
}
|
|
|
|
QWidget::changeEvent(event);
|
|
}
|
|
|
|
void ConfigureGraphicsAdvanced::RetranslateUI() {
|
|
ui->retranslateUi(this);
|
|
}
|
|
|
|
void ConfigureGraphicsAdvanced::ExposeComputeOption() {
|
|
checkbox_enable_compute_pipelines->setVisible(true);
|
|
}
|