Make the GUI show a translated "No audio output" sound backend string.

This commit is contained in:
Glenn Rice
2013-04-03 09:22:39 -05:00
parent 1dd1ebb8bd
commit 3fdc46877a
27 changed files with 401 additions and 267 deletions

View File

@ -27,7 +27,7 @@
#include "SysConf.h"
// DSP Backend Types
#define BACKEND_NULLSOUND "No audio output"
#define BACKEND_NULLSOUND _trans("No audio output")
#define BACKEND_ALSA "ALSA"
#define BACKEND_AOSOUND "AOSound"
#define BACKEND_COREAUDIO "CoreAudio"

View File

@ -970,7 +970,9 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
VolumeSlider->Enable(SupportsVolumeChanges(WxStrToStr(BackendSelection->GetStringSelection())));
Latency->Enable(WxStrToStr(BackendSelection->GetStringSelection()) == BACKEND_OPENAL);
DPL2Decoder->Enable(WxStrToStr(BackendSelection->GetStringSelection()) == BACKEND_OPENAL);
SConfig::GetInstance().sBackend = WxStrToStr(BackendSelection->GetStringSelection());
// Don't save the translated BACKEND_NULLSOUND string
SConfig::GetInstance().sBackend = BackendSelection->GetSelection() ?
WxStrToStr(BackendSelection->GetStringSelection()) : BACKEND_NULLSOUND;
AudioCommon::UpdateSoundStream();
break;
@ -991,7 +993,7 @@ void CConfigMain::AddAudioBackends()
for (std::vector<std::string>::const_iterator iter = backends.begin();
iter != backends.end(); ++iter)
{
BackendSelection->Append(StrToWxStr(*iter));
BackendSelection->Append(wxGetTranslation(StrToWxStr(*iter)));
int num = BackendSelection->
FindString(StrToWxStr(SConfig::GetInstance().sBackend));
BackendSelection->SetSelection(num);