Download Source Code/Yuzu/src/yuzu/configuration/configure_graphics_advanced.cpp from GilbertClaus/Emulator: direct link, hf CLI and curl.
- Browser
- Download file 2.56 kB
-
https://huggingface.co/GilbertClaus/Emulator/resolve/main/Source%20Code/Yuzu/src/yuzu/configuration/configure_graphics_advanced.cpp
- Command line
-
hf download 'hf://GilbertClaus/Emulator/Source Code/Yuzu/src/yuzu/configuration/configure_graphics_advanced.cpp'
-
curl -L -o configure_graphics_advanced.cpp https://huggingface.co/GilbertClaus/Emulator/resolve/main/Source%20Code/Yuzu/src/yuzu/configuration/configure_graphics_advanced.cpp
2.56 kB
| // SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project | |
| // SPDX-License-Identifier: GPL-2.0-or-later | |
| 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& layout = *ui->populate_target->layout(); | |
| std::map<u32, QWidget*> hold{}; // A map will sort the data for us | |
| 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; | |
| } | |
| hold.emplace(setting->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] : hold) { | |
| 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); | |
| } | |