Add new window to configure SDL hints and store them in the main ini file

Signed-off-by: Andrew Strauss <astrauss11@gmail.com>
This commit is contained in:
Andrew Strauss
2026-02-09 21:47:30 -05:00
parent ebc8c9d857
commit 61c36b0cc8
9 changed files with 433 additions and 5 deletions

View File

@@ -11,6 +11,7 @@
#include "Core/Config/MainSettings.h"
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
#include "DolphinQt/Config/SDLHints/SDLHintsWindow.h"
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
#include "DolphinQt/QtUtils/SignalBlocking.h"
#include "DolphinQt/Settings.h"
@@ -33,9 +34,11 @@ void CommonControllersWidget::CreateLayout()
m_common_bg_input = new QCheckBox(tr("Background Input"));
m_common_configure_controller_interface =
new NonDefaultQPushButton(tr("Alternate Input Sources"));
m_common_configure_sdl_hints = new NonDefaultQPushButton(tr("SDL Controller Settings"));
m_common_layout->addWidget(m_common_bg_input);
m_common_layout->addWidget(m_common_configure_controller_interface);
m_common_layout->addWidget(m_common_configure_sdl_hints);
m_common_box->setLayout(m_common_layout);
@@ -51,6 +54,8 @@ void CommonControllersWidget::ConnectWidgets()
connect(m_common_bg_input, &QCheckBox::toggled, this, &CommonControllersWidget::SaveSettings);
connect(m_common_configure_controller_interface, &QPushButton::clicked, this,
&CommonControllersWidget::OnControllerInterfaceConfigure);
connect(m_common_configure_sdl_hints, &QPushButton::clicked, this,
&CommonControllersWidget::OnSDLHintConfigure);
}
void CommonControllersWidget::OnControllerInterfaceConfigure()
@@ -61,6 +66,14 @@ void CommonControllersWidget::OnControllerInterfaceConfigure()
window->show();
}
void CommonControllersWidget::OnSDLHintConfigure()
{
SDLHintsWindow* window = new SDLHintsWindow(this);
window->setAttribute(Qt::WA_DeleteOnClose, true);
window->setWindowModality(Qt::WindowModality::WindowModal);
window->show();
}
void CommonControllersWidget::LoadSettings()
{
SignalBlocking(m_common_bg_input)->setChecked(Config::Get(Config::MAIN_INPUT_BACKGROUND_INPUT));