1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 12:47:44 +00:00

When launching via Steam, disable the wine options that do nothing

This commit is contained in:
Joshua Goins 2022-09-06 10:28:45 -04:00
parent 8dc37ed24b
commit 59a66932e7

View file

@ -217,6 +217,7 @@ void SettingsWindow::reloadControls() {
// wine
#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
if(!core.isSteam) {
if (!profile.isWineInstalled()) {
wineVersionLabel->setText("Wine is not installed.");
} else {
@ -227,6 +228,7 @@ void SettingsWindow::reloadControls() {
selectWineButton->setEnabled(profile.wineType == WineType::Custom);
winePathLabel->setText(profile.winePath);
winePrefixDirectory->setText(profile.winePrefixPath);
}
#endif
#if defined(Q_OS_LINUX)
@ -472,6 +474,7 @@ void SettingsWindow::setupLoginTab(QFormLayout& layout) {
void SettingsWindow::setupWineTab(QFormLayout& layout) {
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
if(!core.isSteam) {
winePathLabel = new QLabel();
winePathLabel->setTextInteractionFlags(Qt::TextInteractionFlag::TextSelectableByMouse);
layout.addRow("Wine Executable", winePathLabel);
@ -483,7 +486,7 @@ void SettingsWindow::setupWineTab(QFormLayout& layout) {
wineTypeCombo->insertItem(3, "XIV on Mac");
#endif
if(core.isSteam) {
if (core.isSteam) {
wineTypeCombo->insertItem(0, "Steam Proton");
wineTypeCombo->setEnabled(false);
} else {
@ -503,7 +506,8 @@ void SettingsWindow::setupWineTab(QFormLayout& layout) {
layout.addWidget(selectWineButton);
#endif
connect(wineTypeCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [this](int index) {
connect(
wineTypeCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [this](int index) {
getCurrentProfile().wineType = (WineType)index;
this->core.readWineInfo(getCurrentProfile());
@ -548,6 +552,10 @@ void SettingsWindow::setupWineTab(QFormLayout& layout) {
window.openPath(getCurrentProfile().winePrefixPath);
});
winePrefixButtonLayout->addWidget(openPrefixButton);
} else {
auto label = new QLabel("You are launching Astra via Steam. Proton is used automatically and can not be configured.");
layout.addWidget(label);
}
auto enableDXVKhud = new QCheckBox("Enable DXVK HUD");
layout.addRow("Wine Tweaks", enableDXVKhud);