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 // wine
#if defined(Q_OS_LINUX) || defined(Q_OS_MAC) #if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
if(!core.isSteam) {
if (!profile.isWineInstalled()) { if (!profile.isWineInstalled()) {
wineVersionLabel->setText("Wine is not installed."); wineVersionLabel->setText("Wine is not installed.");
} else { } else {
@ -227,6 +228,7 @@ void SettingsWindow::reloadControls() {
selectWineButton->setEnabled(profile.wineType == WineType::Custom); selectWineButton->setEnabled(profile.wineType == WineType::Custom);
winePathLabel->setText(profile.winePath); winePathLabel->setText(profile.winePath);
winePrefixDirectory->setText(profile.winePrefixPath); winePrefixDirectory->setText(profile.winePrefixPath);
}
#endif #endif
#if defined(Q_OS_LINUX) #if defined(Q_OS_LINUX)
@ -472,6 +474,7 @@ void SettingsWindow::setupLoginTab(QFormLayout& layout) {
void SettingsWindow::setupWineTab(QFormLayout& layout) { void SettingsWindow::setupWineTab(QFormLayout& layout) {
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX) #if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
if(!core.isSteam) {
winePathLabel = new QLabel(); winePathLabel = new QLabel();
winePathLabel->setTextInteractionFlags(Qt::TextInteractionFlag::TextSelectableByMouse); winePathLabel->setTextInteractionFlags(Qt::TextInteractionFlag::TextSelectableByMouse);
layout.addRow("Wine Executable", winePathLabel); layout.addRow("Wine Executable", winePathLabel);
@ -503,7 +506,8 @@ void SettingsWindow::setupWineTab(QFormLayout& layout) {
layout.addWidget(selectWineButton); layout.addWidget(selectWineButton);
#endif #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; getCurrentProfile().wineType = (WineType)index;
this->core.readWineInfo(getCurrentProfile()); this->core.readWineInfo(getCurrentProfile());
@ -548,6 +552,10 @@ void SettingsWindow::setupWineTab(QFormLayout& layout) {
window.openPath(getCurrentProfile().winePrefixPath); window.openPath(getCurrentProfile().winePrefixPath);
}); });
winePrefixButtonLayout->addWidget(openPrefixButton); 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"); auto enableDXVKhud = new QCheckBox("Enable DXVK HUD");
layout.addRow("Wine Tweaks", enableDXVKhud); layout.addRow("Wine Tweaks", enableDXVKhud);