2016-08-24 22:15:38 -04:00
|
|
|
// Copyright 2016 Citra Emulator Project
|
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2016-09-18 09:38:01 +09:00
|
|
|
#include <memory>
|
2020-01-21 16:40:53 -03:00
|
|
|
#include <vector>
|
|
|
|
|
#include <QString>
|
2016-09-21 00:21:23 +09:00
|
|
|
#include <QWidget>
|
2021-04-14 16:07:40 -07:00
|
|
|
#include "common/settings.h"
|
2020-07-14 15:42:12 -04:00
|
|
|
|
|
|
|
|
namespace ConfigurationShared {
|
|
|
|
|
enum class CheckState;
|
|
|
|
|
}
|
2016-08-24 22:15:38 -04:00
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class ConfigureGraphics;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-18 09:38:01 +09:00
|
|
|
class ConfigureGraphics : public QWidget {
|
2016-08-24 22:15:38 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2016-09-18 09:38:01 +09:00
|
|
|
explicit ConfigureGraphics(QWidget* parent = nullptr);
|
2018-12-02 14:10:28 -05:00
|
|
|
~ConfigureGraphics() override;
|
2016-08-24 22:15:38 -04:00
|
|
|
|
2019-05-26 00:39:23 -04:00
|
|
|
void ApplyConfiguration();
|
2016-08-24 22:15:38 -04:00
|
|
|
|
|
|
|
|
private:
|
2019-06-05 18:39:46 -04:00
|
|
|
void changeEvent(QEvent* event) override;
|
|
|
|
|
void RetranslateUI();
|
|
|
|
|
|
2019-05-26 00:39:23 -04:00
|
|
|
void SetConfiguration();
|
2016-08-24 22:15:38 -04:00
|
|
|
|
2019-01-20 22:09:23 -05:00
|
|
|
void UpdateBackgroundColorButton(QColor color);
|
2021-07-08 17:28:48 -04:00
|
|
|
void UpdateAPILayout();
|
2020-01-21 16:40:53 -03:00
|
|
|
void UpdateDeviceSelection(int device);
|
2021-07-08 17:28:48 -04:00
|
|
|
void UpdateShaderBackendSelection(int backend);
|
2020-01-21 16:40:53 -03:00
|
|
|
|
|
|
|
|
void RetrieveVulkanDevices();
|
|
|
|
|
|
2020-07-09 22:42:09 -04:00
|
|
|
void SetupPerGameUI();
|
|
|
|
|
|
2020-01-21 16:40:53 -03:00
|
|
|
Settings::RendererBackend GetCurrentGraphicsBackend() const;
|
2021-08-08 16:56:40 -04:00
|
|
|
Settings::NvdecEmulation GetCurrentNvdecEmulation() const;
|
2019-01-20 22:09:23 -05:00
|
|
|
|
2016-08-24 22:15:38 -04:00
|
|
|
std::unique_ptr<Ui::ConfigureGraphics> ui;
|
2018-09-08 16:57:19 -07:00
|
|
|
QColor bg_color;
|
2020-01-21 16:40:53 -03:00
|
|
|
|
2020-10-26 23:07:36 -04:00
|
|
|
ConfigurationShared::CheckState use_nvdec_emulation;
|
2021-06-13 15:38:54 -04:00
|
|
|
ConfigurationShared::CheckState accelerate_astc;
|
2020-07-14 15:42:12 -04:00
|
|
|
ConfigurationShared::CheckState use_disk_shader_cache;
|
|
|
|
|
ConfigurationShared::CheckState use_asynchronous_gpu_emulation;
|
2020-07-14 13:55:47 -04:00
|
|
|
|
2020-01-21 16:40:53 -03:00
|
|
|
std::vector<QString> vulkan_devices;
|
|
|
|
|
u32 vulkan_device{};
|
2021-07-08 17:28:48 -04:00
|
|
|
Settings::ShaderBackend shader_backend{};
|
2016-08-24 22:15:38 -04:00
|
|
|
};
|