mirror of https://github.com/PCSX2/pcsx2.git
Qt: Delete SDLRawInput on non win32 builds
This commit is contained in:
parent
a5f83329cb
commit
79f4af8ab5
|
@ -37,13 +37,19 @@ ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent,
|
||||||
#ifdef SDL_BUILD
|
#ifdef SDL_BUILD
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLSource, "InputSources", "SDL", true);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLSource, "InputSources", "SDL", true);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLEnhancedMode, "InputSources", "SDLControllerEnhancedMode", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLEnhancedMode, "InputSources", "SDLControllerEnhancedMode", false);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLRawInput, "InputSources", "SDLRawInput", false);
|
|
||||||
connect(m_ui.enableSDLSource, &QCheckBox::stateChanged, this, &ControllerGlobalSettingsWidget::updateSDLOptionsEnabled);
|
connect(m_ui.enableSDLSource, &QCheckBox::stateChanged, this, &ControllerGlobalSettingsWidget::updateSDLOptionsEnabled);
|
||||||
connect(m_ui.ledSettings, &QToolButton::clicked, this, &ControllerGlobalSettingsWidget::ledSettingsClicked);
|
connect(m_ui.ledSettings, &QToolButton::clicked, this, &ControllerGlobalSettingsWidget::ledSettingsClicked);
|
||||||
#else
|
#else
|
||||||
m_ui.enableSDLSource->setEnabled(false);
|
m_ui.enableSDLSource->setEnabled(false);
|
||||||
m_ui.ledSettings->setEnabled(false);
|
m_ui.ledSettings->setEnabled(false);
|
||||||
m_ui.enableSDLRawInput->setEnabled(false);
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_BUILD) && defined(_WIN32)
|
||||||
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLRawInput, "InputSources", "SDLRawInput", false);
|
||||||
|
#else
|
||||||
|
m_ui.gridLayout_2->removeWidget(m_ui.enableSDLRawInput);
|
||||||
|
m_ui.enableSDLRawInput->deleteLater();
|
||||||
|
m_ui.enableSDLRawInput = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableMouseMapping, "UI", "EnableMouseMapping", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableMouseMapping, "UI", "EnableMouseMapping", false);
|
||||||
|
@ -62,7 +68,6 @@ ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent,
|
||||||
m_ui.mainLayout->removeWidget(m_ui.dinputGroup);
|
m_ui.mainLayout->removeWidget(m_ui.dinputGroup);
|
||||||
m_ui.dinputGroup->deleteLater();
|
m_ui.dinputGroup->deleteLater();
|
||||||
m_ui.dinputGroup = nullptr;
|
m_ui.dinputGroup = nullptr;
|
||||||
m_ui.enableSDLRawInput->hide();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dialog->isEditingProfile())
|
if (dialog->isEditingProfile())
|
||||||
|
@ -116,7 +121,9 @@ void ControllerGlobalSettingsWidget::updateSDLOptionsEnabled()
|
||||||
const bool enabled = m_ui.enableSDLSource->isChecked();
|
const bool enabled = m_ui.enableSDLSource->isChecked();
|
||||||
m_ui.enableSDLEnhancedMode->setEnabled(enabled);
|
m_ui.enableSDLEnhancedMode->setEnabled(enabled);
|
||||||
m_ui.ledSettings->setEnabled(enabled);
|
m_ui.ledSettings->setEnabled(enabled);
|
||||||
|
#ifdef _WIN32
|
||||||
m_ui.enableSDLRawInput->setEnabled(enabled);
|
m_ui.enableSDLRawInput->setEnabled(enabled);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControllerGlobalSettingsWidget::ledSettingsClicked()
|
void ControllerGlobalSettingsWidget::ledSettingsClicked()
|
||||||
|
|
|
@ -3749,9 +3749,11 @@ void FullscreenUI::DrawControllerSettingsPage()
|
||||||
"Provides vibration and LED control support over Bluetooth.", "InputSources", "SDLControllerEnhancedMode", false,
|
"Provides vibration and LED control support over Bluetooth.", "InputSources", "SDLControllerEnhancedMode", false,
|
||||||
bsi->GetBoolValue("InputSources", "SDL", true), false);
|
bsi->GetBoolValue("InputSources", "SDL", true), false);
|
||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32
|
#if defined(SDL_BUILD) && defined(_WIN32)
|
||||||
DrawToggleSetting(bsi, ICON_FA_COG " SDL Raw Input", "Allow SDL to use raw access to input devices.", "InputSources", "SDLRawInput",
|
DrawToggleSetting(bsi, ICON_FA_COG " SDL Raw Input", "Allow SDL to use raw access to input devices.", "InputSources", "SDLRawInput",
|
||||||
false, bsi->GetBoolValue("InputSources", "SDL", true), false);
|
false, bsi->GetBoolValue("InputSources", "SDL", true), false);
|
||||||
|
#endif
|
||||||
|
#ifdef _WIN32
|
||||||
DrawToggleSetting(bsi, ICON_FA_COG " Enable XInput Input Source",
|
DrawToggleSetting(bsi, ICON_FA_COG " Enable XInput Input Source",
|
||||||
"The XInput source provides support for XBox 360/XBox One/XBox Series controllers.", "InputSources", "XInput", false, true, false);
|
"The XInput source provides support for XBox 360/XBox One/XBox Series controllers.", "InputSources", "XInput", false, true, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue