2017-06-15 23:43:14 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-06-15 23:43:14 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-03-16 13:10:22 +00:00
|
|
|
#include <array>
|
2018-07-06 22:40:15 +00:00
|
|
|
#include "DolphinQt/Config/Graphics/GraphicsWidget.h"
|
2017-06-15 23:43:14 +00:00
|
|
|
|
2023-04-21 21:02:53 +00:00
|
|
|
class ConfigBool;
|
2023-04-25 03:36:43 +00:00
|
|
|
class ConfigChoice;
|
2020-10-17 05:06:34 +00:00
|
|
|
class GraphicsRadioInt;
|
2017-06-15 23:43:14 +00:00
|
|
|
class GraphicsWindow;
|
|
|
|
class QCheckBox;
|
|
|
|
class QComboBox;
|
2018-03-16 13:10:22 +00:00
|
|
|
class QRadioButton;
|
2017-06-15 23:43:14 +00:00
|
|
|
class QGridLayout;
|
2020-10-17 05:06:34 +00:00
|
|
|
class ToolTipComboBox;
|
2017-06-15 23:43:14 +00:00
|
|
|
|
|
|
|
namespace X11Utils
|
|
|
|
{
|
|
|
|
class XRRConfiguration;
|
|
|
|
}
|
|
|
|
|
|
|
|
class GeneralWidget final : public GraphicsWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit GeneralWidget(X11Utils::XRRConfiguration* xrr_config, GraphicsWindow* parent);
|
|
|
|
signals:
|
|
|
|
void BackendChanged(const QString& backend);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void LoadSettings() override;
|
|
|
|
void SaveSettings() override;
|
|
|
|
|
|
|
|
void CreateWidgets();
|
|
|
|
void ConnectWidgets();
|
|
|
|
void AddDescriptions();
|
|
|
|
|
|
|
|
void OnBackendChanged(const QString& backend_name);
|
|
|
|
void OnEmulationStateChanged(bool running);
|
|
|
|
|
|
|
|
// Video
|
|
|
|
QGridLayout* m_video_layout;
|
2020-10-17 05:06:34 +00:00
|
|
|
ToolTipComboBox* m_backend_combo;
|
|
|
|
ToolTipComboBox* m_adapter_combo;
|
2023-04-25 03:36:43 +00:00
|
|
|
ConfigChoice* m_aspect_combo;
|
2023-04-21 21:02:53 +00:00
|
|
|
ConfigBool* m_enable_vsync;
|
|
|
|
ConfigBool* m_enable_fullscreen;
|
2017-06-15 23:43:14 +00:00
|
|
|
|
|
|
|
// Options
|
2023-04-21 21:02:53 +00:00
|
|
|
ConfigBool* m_show_ping;
|
|
|
|
ConfigBool* m_autoadjust_window_size;
|
|
|
|
ConfigBool* m_show_messages;
|
|
|
|
ConfigBool* m_render_main_window;
|
2020-10-17 05:06:34 +00:00
|
|
|
std::array<GraphicsRadioInt*, 4> m_shader_compilation_mode{};
|
2023-04-21 21:02:53 +00:00
|
|
|
ConfigBool* m_wait_for_shaders;
|
2017-06-15 23:43:14 +00:00
|
|
|
|
|
|
|
X11Utils::XRRConfiguration* m_xrr_config;
|
|
|
|
};
|