mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T731, Ref T739, adjusted launcher to only support "STANDALONE" and "DISTRIBUTED"
* the audio on core/GUI modes are no longer valid * aligned the core mode enum
This commit is contained in:
committed by
Mat Sutcliffe
parent
bcd97c3a60
commit
9ddb55e79f
@@ -22,22 +22,24 @@ namespace BlackCore
|
||||
//! Core runs how and where?
|
||||
enum CoreMode
|
||||
{
|
||||
CoreInGuiProcess,
|
||||
CoreExternal
|
||||
Standalone,
|
||||
Distributed
|
||||
};
|
||||
|
||||
//! String to core mode
|
||||
static CoreMode stringToCoreMode(const QString &m)
|
||||
{
|
||||
QString cm(m.toLower().trimmed());
|
||||
if (cm.isEmpty()) { return CoreInGuiProcess; }
|
||||
if (m == coreModeToString(CoreInGuiProcess)) { return CoreInGuiProcess; }
|
||||
if (m == coreModeToString(CoreExternal)) { return CoreExternal; }
|
||||
if (cm.isEmpty()) { return Standalone; }
|
||||
if (m == coreModeToString(Standalone)) { return Standalone; }
|
||||
if (m == coreModeToString(Distributed)) { return Distributed; }
|
||||
|
||||
// some alternative names
|
||||
if (cm.contains("external")) { return CoreExternal; }
|
||||
if (cm.contains("gui")) { return CoreInGuiProcess; }
|
||||
return CoreInGuiProcess;
|
||||
if (cm.contains("distribute")) { return Distributed; }
|
||||
if (cm.contains("standalone")) { return Standalone; }
|
||||
if (cm.contains("external")) { return Distributed; }
|
||||
if (cm.contains("gui")) { return Standalone; }
|
||||
return Standalone;
|
||||
}
|
||||
|
||||
//! Core mode as string
|
||||
@@ -45,8 +47,8 @@ namespace BlackCore
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case CoreInGuiProcess: return QStringLiteral("coreinguiprocess");
|
||||
case CoreExternal: return QStringLiteral("coreexternal");
|
||||
case Standalone: return QStringLiteral("standalone");
|
||||
case Distributed: return QStringLiteral("distributed");
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -37,8 +37,7 @@ namespace BlackCore
|
||||
enum CoreMode
|
||||
{
|
||||
Standalone,
|
||||
CoreWithAudioOnGui,
|
||||
CoreWithAudioOnCore,
|
||||
Distributed
|
||||
};
|
||||
|
||||
//! Default constructor
|
||||
|
||||
Reference in New Issue
Block a user