mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 16:55:36 +08:00
[AFV] Ref T739, audio can be disabled from launcher
This commit is contained in:
committed by
Mat Sutcliffe
parent
6871e3d03d
commit
0df63f4b6b
@@ -320,7 +320,8 @@ bool CSwiftLauncher::setSwiftCoreExecutable()
|
|||||||
if (!sGui || sGui->isShuttingDown()) { return false; }
|
if (!sGui || sGui->isShuttingDown()) { return false; }
|
||||||
this->saveSetup();
|
this->saveSetup();
|
||||||
QStringList args = ui->comp_DBusSelector->getDBusCmdLineArgs();
|
QStringList args = ui->comp_DBusSelector->getDBusCmdLineArgs();
|
||||||
if (ui->cb_resetWindow->isChecked()) { args.append("--resetsize"); }
|
if (ui->cb_ResetWindow->isChecked()) { args.append("--resetsize"); }
|
||||||
|
if (ui->cb_DisableCoreAudio->isChecked()) { args.append("--noaudio"); }
|
||||||
|
|
||||||
m_executableArgs = sGui->argumentsJoined(args);
|
m_executableArgs = sGui->argumentsJoined(args);
|
||||||
m_executable = CDirectoryUtils::executableFilePath(CBuildConfig::swiftCoreExecutableName());
|
m_executable = CDirectoryUtils::executableFilePath(CBuildConfig::swiftCoreExecutableName());
|
||||||
@@ -355,9 +356,15 @@ bool CSwiftLauncher::setSwiftGuiExecutable()
|
|||||||
"--window", CEnableForFramelessWindow::windowModeToString(getWindowMode())
|
"--window", CEnableForFramelessWindow::windowModeToString(getWindowMode())
|
||||||
};
|
};
|
||||||
|
|
||||||
if (ui->cb_resetWindow->isChecked()) { args << "--resetsize"; }
|
if (ui->cb_ResetWindow->isChecked()) { args << "--resetsize"; }
|
||||||
if (!this->isStandaloneGuiSelected())
|
if (this->isStandaloneGuiSelected())
|
||||||
{
|
{
|
||||||
|
if (ui->cb_DisableSaAfv->isChecked()) { args.append("--noaudio"); }
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ui->cb_DisableGUIAfv->isChecked()) { args.append("--noaudio"); }
|
||||||
|
|
||||||
const QString dBus(ui->comp_DBusSelector->getDBusAddress());
|
const QString dBus(ui->comp_DBusSelector->getDBusAddress());
|
||||||
args.append(ui->comp_DBusSelector->getDBusCmdLineArgs());
|
args.append(ui->comp_DBusSelector->getDBusCmdLineArgs());
|
||||||
this->saveSetup();
|
this->saveSetup();
|
||||||
@@ -601,6 +608,8 @@ void CSwiftLauncher::onCoreModeReleased()
|
|||||||
const bool sa = ui->rb_SwiftStandalone->isChecked();
|
const bool sa = ui->rb_SwiftStandalone->isChecked();
|
||||||
ui->comp_DBusSelector->setEnabled(!sa);
|
ui->comp_DBusSelector->setEnabled(!sa);
|
||||||
ui->tb_SwiftCore->setEnabled(!sa);
|
ui->tb_SwiftCore->setEnabled(!sa);
|
||||||
|
ui->gb_AudioSa->setEnabled(sa);
|
||||||
|
ui->gb_AudioDistributed->setEnabled(!sa);
|
||||||
this->saveSetup();
|
this->saveSetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QToolBox" name="tb_Launcher">
|
<widget class="QToolBox" name="tb_Launcher">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>4</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="tabSpacing">
|
<property name="tabSpacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
@@ -98,8 +98,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>135</width>
|
<width>392</width>
|
||||||
<height>109</height>
|
<height>309</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
@@ -153,8 +153,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>163</width>
|
<width>392</width>
|
||||||
<height>52</height>
|
<height>309</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
@@ -218,8 +218,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>233</width>
|
<width>381</width>
|
||||||
<height>166</height>
|
<height>332</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
@@ -251,17 +251,46 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" alignment="Qt::AlignHCenter">
|
<item row="4" column="1">
|
||||||
<widget class="QRadioButton" name="rb_SwiftDistributed">
|
<widget class="QGroupBox" name="gb_AudioDistributed">
|
||||||
<property name="text">
|
<property name="minimumSize">
|
||||||
<string>GUI and core (distributed)</string>
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="buttonGroup">
|
<property name="title">
|
||||||
<string notr="true">bg_CoreMode</string>
|
<string>Audio distributed</string>
|
||||||
</attribute>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cb_DisableCoreAudio">
|
||||||
|
<property name="text">
|
||||||
|
<string>disable core audio (AFV)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cb_DisableGUIAfv">
|
||||||
|
<property name="text">
|
||||||
|
<string>disable GUI audio (AFV)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
<item row="1" column="0" alignment="Qt::AlignHCenter">
|
||||||
|
<widget class="QLabel" name="lbl_SwiftStandaloneIcon">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="swiftlauncher.qrc">:/launcher/icons/swiftNormal61x100.png</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0" colspan="2">
|
||||||
<spacer name="vs_CoreButtomSpace">
|
<spacer name="vs_CoreButtomSpace">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@@ -274,16 +303,39 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="2" alignment="Qt::AlignRight">
|
<item row="0" column="1" alignment="Qt::AlignHCenter">
|
||||||
|
<widget class="QRadioButton" name="rb_SwiftDistributed">
|
||||||
|
<property name="text">
|
||||||
|
<string>GUI and core (distributed)</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">bg_CoreMode</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" alignment="Qt::AlignHCenter">
|
||||||
|
<widget class="QRadioButton" name="rb_SwiftStandalone">
|
||||||
|
<property name="text">
|
||||||
|
<string>standalone</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">bg_CoreMode</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2" alignment="Qt::AlignRight">
|
||||||
<widget class="QGroupBox" name="gb_DBusServer">
|
<widget class="QGroupBox" name="gb_DBusServer">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>225</width>
|
<width>200</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>DBus (swift core/GUI, NOT XSwiftBus)</string>
|
<string>DBus (core to GUI)</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_DBusGroupBox">
|
<layout class="QVBoxLayout" name="vl_DBusGroupBox">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@@ -320,27 +372,20 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" alignment="Qt::AlignHCenter">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="lbl_SwiftStandaloneIcon">
|
<widget class="QGroupBox" name="gb_AudioSa">
|
||||||
<property name="text">
|
<property name="title">
|
||||||
<string/>
|
<string>Audio</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<pixmap resource="swiftlauncher.qrc">:/launcher/icons/swiftNormal61x100.png</pixmap>
|
<item>
|
||||||
</property>
|
<widget class="QCheckBox" name="cb_DisableSaAfv">
|
||||||
</widget>
|
<property name="text">
|
||||||
</item>
|
<string>disable audio (AFV)</string>
|
||||||
<item row="0" column="0" alignment="Qt::AlignHCenter">
|
</property>
|
||||||
<widget class="QRadioButton" name="rb_SwiftStandalone">
|
</widget>
|
||||||
<property name="text">
|
</item>
|
||||||
<string>standalone</string>
|
</layout>
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">bg_CoreMode</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -350,8 +395,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>98</width>
|
<width>392</width>
|
||||||
<height>237</height>
|
<height>309</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
@@ -432,8 +477,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>98</width>
|
<width>376</width>
|
||||||
<height>31</height>
|
<height>126</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_DataUpdatesScrollArea">
|
<layout class="QVBoxLayout" name="vl_DataUpdatesScrollArea">
|
||||||
@@ -755,7 +800,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3" colspan="2">
|
<item row="0" column="3" colspan="2">
|
||||||
<widget class="QCheckBox" name="cb_resetWindow">
|
<widget class="QCheckBox" name="cb_ResetWindow">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>reset window</string>
|
<string>reset window</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -865,17 +910,25 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>rb_WindowNormal</tabstop>
|
|
||||||
<tabstop>rb_WindowFrameless</tabstop>
|
|
||||||
<tabstop>rb_SwiftStandalone</tabstop>
|
<tabstop>rb_SwiftStandalone</tabstop>
|
||||||
<tabstop>rb_SwiftDistributed</tabstop>
|
<tabstop>rb_SwiftDistributed</tabstop>
|
||||||
<tabstop>sa_DataUpdates</tabstop>
|
<tabstop>cb_ResetWindow</tabstop>
|
||||||
<tabstop>tb_SwiftGui</tabstop>
|
<tabstop>tb_SwiftGui</tabstop>
|
||||||
<tabstop>tb_SwiftCore</tabstop>
|
<tabstop>tb_SwiftCore</tabstop>
|
||||||
<tabstop>tb_SwiftMappingTool</tabstop>
|
<tabstop>tb_SwiftMappingTool</tabstop>
|
||||||
<tabstop>tb_Database</tabstop>
|
|
||||||
<tabstop>tb_ConfigurationWizard</tabstop>
|
<tabstop>tb_ConfigurationWizard</tabstop>
|
||||||
|
<tabstop>tb_Database</tabstop>
|
||||||
|
<tabstop>sa_DataUpdates</tabstop>
|
||||||
|
<tabstop>pb_Log</tabstop>
|
||||||
|
<tabstop>pb_LogDir</tabstop>
|
||||||
|
<tabstop>pb_DumpDir</tabstop>
|
||||||
|
<tabstop>pb_P3DConfigDirs</tabstop>
|
||||||
|
<tabstop>pb_FSXConfigDirs</tabstop>
|
||||||
|
<tabstop>tw_LatestNewsAbout</tabstop>
|
||||||
|
<tabstop>tbr_LatestNews</tabstop>
|
||||||
<tabstop>tb_BackToMain</tabstop>
|
<tabstop>tb_BackToMain</tabstop>
|
||||||
|
<tabstop>rb_WindowNormal</tabstop>
|
||||||
|
<tabstop>rb_WindowFrameless</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="swiftlauncher.qrc"/>
|
<include location="swiftlauncher.qrc"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user