summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorDentomologist <dentomologist@gmail.com>2023-04-26 15:35:40 -0700
committerDentomologist <dentomologist@gmail.com>2023-04-27 16:50:56 -0700
commitb59ca9682ec179cff99c08a53ddcdecda9179a73 (patch)
tree561d73da7ae0d8e8c34b1fdb724c1d77ced7c37c /Source/Core
parenta75d22d90142ab0fd74e25979fe45f5644164613 (diff)
Qt/GeneralWidget and GraphicsWidget: Remove unused member variable
m_xrr_config was used by the GeneralWidget::GetAvailableResolutions function to get the list of supported fullscreen resolutions when HAVE_XRANDR was set. aa4088a removed the ability to set that resolution in the UI, leaving the GetAvailableResolutions function unused. m_xrr_config is initialized in MainWindow which still uses it to toggle fullscreen, but the references in GeneralWidget and GraphicsWidget (which just ferried m_xrr_config from MainWindow to GeneralWidget) are now unnecessary and removed in this commit.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp5
-rw-r--r--Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h9
-rw-r--r--Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.cpp5
-rw-r--r--Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.h9
-rw-r--r--Source/Core/DolphinQt/MainWindow.cpp4
5 files changed, 6 insertions, 26 deletions
diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
index b086a56fbc..1911a3e9b9 100644
--- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
+++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
@@ -26,13 +26,10 @@
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/Settings.h"
-#include "UICommon/VideoUtils.h"
-
#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoConfig.h"
-GeneralWidget::GeneralWidget(X11Utils::XRRConfiguration* xrr_config, GraphicsWindow* parent)
- : m_xrr_config(xrr_config)
+GeneralWidget::GeneralWidget(GraphicsWindow* parent)
{
CreateWidgets();
LoadSettings();
diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h
index b3058d1208..0cf6e59b66 100644
--- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h
+++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h
@@ -16,16 +16,11 @@ class QRadioButton;
class QGridLayout;
class ToolTipComboBox;
-namespace X11Utils
-{
-class XRRConfiguration;
-}
-
class GeneralWidget final : public GraphicsWidget
{
Q_OBJECT
public:
- explicit GeneralWidget(X11Utils::XRRConfiguration* xrr_config, GraphicsWindow* parent);
+ explicit GeneralWidget(GraphicsWindow* parent);
signals:
void BackendChanged(const QString& backend);
@@ -55,6 +50,4 @@ private:
ConfigBool* m_render_main_window;
std::array<GraphicsRadioInt*, 4> m_shader_compilation_mode{};
ConfigBool* m_wait_for_shaders;
-
- X11Utils::XRRConfiguration* m_xrr_config;
};
diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.cpp b/Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.cpp
index e346a6d0dd..535458685c 100644
--- a/Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.cpp
+++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.cpp
@@ -24,8 +24,7 @@
#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoConfig.h"
-GraphicsWindow::GraphicsWindow(X11Utils::XRRConfiguration* xrr_config, MainWindow* parent)
- : QDialog(parent), m_xrr_config(xrr_config)
+GraphicsWindow::GraphicsWindow(MainWindow* parent) : QDialog(parent)
{
CreateMainLayout();
@@ -46,7 +45,7 @@ void GraphicsWindow::CreateMainLayout()
main_layout->addWidget(tab_widget);
main_layout->addWidget(button_box);
- auto* const general_widget = new GeneralWidget(m_xrr_config, this);
+ auto* const general_widget = new GeneralWidget(this);
auto* const enhancements_widget = new EnhancementsWidget(this);
auto* const hacks_widget = new HacksWidget(this);
auto* const advanced_widget = new AdvancedWidget(this);
diff --git a/Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.h b/Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.h
index 050b22d15a..c345de3fef 100644
--- a/Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.h
+++ b/Source/Core/DolphinQt/Config/Graphics/GraphicsWindow.h
@@ -16,16 +16,11 @@ class QTabWidget;
class QDialogButtonBox;
class SoftwareRendererWidget;
-namespace X11Utils
-{
-class XRRConfiguration;
-}
-
class GraphicsWindow final : public QDialog
{
Q_OBJECT
public:
- explicit GraphicsWindow(X11Utils::XRRConfiguration* xrr_config, MainWindow* parent);
+ explicit GraphicsWindow(MainWindow* parent);
signals:
void BackendChanged(const QString& backend);
@@ -33,6 +28,4 @@ signals:
private:
void CreateMainLayout();
void OnBackendChanged(const QString& backend);
-
- X11Utils::XRRConfiguration* m_xrr_config;
};
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp
index 3c295c9d74..23c67e0306 100644
--- a/Source/Core/DolphinQt/MainWindow.cpp
+++ b/Source/Core/DolphinQt/MainWindow.cpp
@@ -1282,10 +1282,8 @@ void MainWindow::ShowGraphicsWindow()
"display", windowHandle())),
winId());
}
- m_graphics_window = new GraphicsWindow(m_xrr_config.get(), this);
-#else
- m_graphics_window = new GraphicsWindow(nullptr, this);
#endif
+ m_graphics_window = new GraphicsWindow(this);
InstallHotkeyFilter(m_graphics_window);
}