mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
update the settings display for audio devices
This commit is contained in:
parent
8baca526b1
commit
0c94a71c66
2 changed files with 28 additions and 10 deletions
|
|
@ -277,7 +277,11 @@ SFXProvider* SFXSystem::getBestProviderChoice()
|
||||||
if (smProviders[i]->mType == OpenAL)
|
if (smProviders[i]->mType == OpenAL)
|
||||||
{
|
{
|
||||||
if (smProviders[i]->mDefault)
|
if (smProviders[i]->mDefault)
|
||||||
|
{
|
||||||
|
Con::setVariable("pref::SFX::provider", "OpenAL");
|
||||||
|
Con::setVariable("pref::SFX::device", smProviders[i]->getName());
|
||||||
return smProviders[i];
|
return smProviders[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -314,7 +318,10 @@ SFXProvider* SFXSystem::getBestProviderChoice()
|
||||||
if (smProviders[i]->mType == providerType)
|
if (smProviders[i]->mType == providerType)
|
||||||
{
|
{
|
||||||
if (smProviders[i]->mDefault)
|
if (smProviders[i]->mDefault)
|
||||||
|
{
|
||||||
|
Con::setVariable("pref::SFX::device", smProviders[i]->getName());
|
||||||
return smProviders[i];
|
return smProviders[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(AudioSettingsGroup)
|
||||||
class = "PrimaryOptionsGroup";
|
class = "PrimaryOptionsGroup";
|
||||||
displayName = "Audio";
|
displayName = "Audio";
|
||||||
|
|
||||||
new SimGroup()
|
new SimGroup(AudioDeviceSettingsGroup)
|
||||||
{
|
{
|
||||||
class = "SubOptionsGroup";
|
class = "SubOptionsGroup";
|
||||||
displayName = "Audio Settings";
|
displayName = "Audio Settings";
|
||||||
|
|
@ -65,16 +65,27 @@ function AudioSettingsGroup::populateSettings(%this)
|
||||||
for(%i = 0; %i < %pCount; %i++)
|
for(%i = 0; %i < %pCount; %i++)
|
||||||
{
|
{
|
||||||
%device = sfxGetProviderDevice(%i);
|
%device = sfxGetProviderDevice(%i);
|
||||||
//Device Entry
|
if(%device !$= "SFX Null Device")
|
||||||
%deviceEntry = new ArrayObject()
|
|
||||||
{
|
{
|
||||||
class = "OptionsQualityLevel";
|
%start = strpos(%device,"(");
|
||||||
displayName = %device;
|
%end = strpos(%device,"(", %start);
|
||||||
provider = %provider; //this is for filtering later, if we need to
|
%displayName = %device;
|
||||||
key["$pref::SFX::device"] = %device;
|
if(%start != -1)
|
||||||
};
|
{
|
||||||
|
%displayName = getSubStr(%device, %start+1, %end-1);
|
||||||
AudioSettingsDeviceGroup.add(%deviceEntry);
|
}
|
||||||
|
|
||||||
|
//Device Entry
|
||||||
|
%deviceEntry = new ArrayObject()
|
||||||
|
{
|
||||||
|
class = "OptionsQualityLevel";
|
||||||
|
displayName = %displayName;
|
||||||
|
provider = %provider; //this is for filtering later, if we need to
|
||||||
|
key["$pref::SFX::device"] = %device;
|
||||||
|
};
|
||||||
|
|
||||||
|
AudioSettingsDeviceGroup.add(%deviceEntry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue