mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Removed my previous PanicAlert translation hack. Fixed with a better method suggested by BhaaL. The translation is done by a callback in the MsgHandler routine that is set at program start. Added macros PanicAlertT, SuccessAlertT, PanicYesNoT, and AskYesNoT that are identical to the non T versions except those strings will be added by gettext to the po files to be translated. These can and should be used anywhere in the code for strings that should be translated.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6838 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -35,7 +35,7 @@ void AOSound::SoundLoop()
|
||||
device = ao_open_live(default_driver, &format, NULL /* no options */);
|
||||
if (!device)
|
||||
{
|
||||
PanicAlert("AudioCommon: Error opening AO device.\n");
|
||||
PanicAlertT("AudioCommon: Error opening AO device.\n");
|
||||
ao_shutdown();
|
||||
Stop();
|
||||
return;
|
||||
|
@ -65,9 +65,9 @@ namespace AudioCommon
|
||||
*/
|
||||
return soundStream;
|
||||
}
|
||||
PanicAlert("Could not initialize backend %s.", backend.c_str());
|
||||
PanicAlertT("Could not initialize backend %s.", backend.c_str());
|
||||
}
|
||||
PanicAlert("Sound backend %s is not valid.", backend.c_str());
|
||||
PanicAlertT("Sound backend %s is not valid.", backend.c_str());
|
||||
|
||||
delete soundStream;
|
||||
soundStream = NULL;
|
||||
|
@ -53,7 +53,7 @@ bool DSound::CreateBuffer()
|
||||
else
|
||||
{
|
||||
// Failed.
|
||||
PanicAlert("Sound buffer creation failed: %s", DXGetErrorString(res));
|
||||
PanicAlertT("Sound buffer creation failed: %s", DXGetErrorString(res));
|
||||
dsBuffer = NULL;
|
||||
return false;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ void CMixer::PushSamples(short *samples, unsigned int num_samples)
|
||||
else if (m_sampleRate == 48000)
|
||||
Common::AtomicAdd(m_numSamples, num_samples * 3 / 2);
|
||||
else
|
||||
PanicAlert("Mixer: Unsupported sample rate.");
|
||||
PanicAlertT("Mixer: Unsupported sample rate.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -51,19 +51,19 @@ bool OpenALStream::Start()
|
||||
else
|
||||
{
|
||||
alcCloseDevice(pDevice);
|
||||
PanicAlert("OpenAL: can't create context "
|
||||
PanicAlertT("OpenAL: can't create context "
|
||||
"for device %s", defDevName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("OpenAL: can't open device %s", defDevName);
|
||||
PanicAlertT("OpenAL: can't open device %s", defDevName);
|
||||
}
|
||||
delete pDeviceList;
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("OpenAL: can't find sound devices");
|
||||
PanicAlertT("OpenAL: can't find sound devices");
|
||||
}
|
||||
|
||||
return bReturn;
|
||||
|
@ -41,14 +41,14 @@ bool WaveFileWriter::Start(const char *filename)
|
||||
// Check if the file is already open
|
||||
if (file)
|
||||
{
|
||||
PanicAlert("The file %s was alrady open, the file header will not be written.", filename);
|
||||
PanicAlertT("The file %s was alrady open, the file header will not be written.", filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
file = fopen(filename, "wb");
|
||||
if (!file)
|
||||
{
|
||||
PanicAlert("The file %s could not be opened for writing. Please check if it's already opened by another program.", filename);
|
||||
PanicAlertT("The file %s could not be opened for writing. Please check if it's already opened by another program.", filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ void WaveFileWriter::Write4(const char *ptr)
|
||||
void WaveFileWriter::AddStereoSamples(const short *sample_data, int count)
|
||||
{
|
||||
if (!file)
|
||||
PanicAlert("WaveFileWriter - file not open.");
|
||||
PanicAlertT("WaveFileWriter - file not open.");
|
||||
if (skip_silence) {
|
||||
bool all_zero = true;
|
||||
for (int i = 0; i < count * 2; i++)
|
||||
@ -122,7 +122,7 @@ void WaveFileWriter::AddStereoSamples(const short *sample_data, int count)
|
||||
void WaveFileWriter::AddStereoSamplesBE(const short *sample_data, int count)
|
||||
{
|
||||
if (!file)
|
||||
PanicAlert("WaveFileWriter - file not open.");
|
||||
PanicAlertT("WaveFileWriter - file not open.");
|
||||
|
||||
if (count > BUF_SIZE * 2)
|
||||
PanicAlert("WaveFileWriter - buffer too small (count = %i).", count);
|
||||
|
@ -48,7 +48,7 @@ struct StreamingVoiceContext : public IXAudio2VoiceCallback
|
||||
// create source voice
|
||||
HRESULT hr;
|
||||
if(FAILED(hr = pXAudio2->CreateSourceVoice(&pSourceVoice, (WAVEFORMATEX*)&wfx, XAUDIO2_VOICE_NOSRC, 1.0f, this)))
|
||||
PanicAlert("XAudio2 CreateSourceVoice failed: %#X", hr);
|
||||
PanicAlertT("XAudio2 CreateSourceVoice failed: %#X", hr);
|
||||
|
||||
pSourceVoice->FlushSourceBuffers();
|
||||
pSourceVoice->Start();
|
||||
@ -130,7 +130,7 @@ bool XAudio2::Start()
|
||||
HRESULT hr;
|
||||
if(FAILED(hr = XAudio2Create(&pXAudio2, 0, XAUDIO2_ANY_PROCESSOR))) //callback dosent seem to run on a speecific cpu anyways
|
||||
{
|
||||
PanicAlert("XAudio2 init failed: %#X", hr);
|
||||
PanicAlertT("XAudio2 init failed: %#X", hr);
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
@ -139,7 +139,7 @@ bool XAudio2::Start()
|
||||
// XAUDIO2_DEFAULT_CHANNELS instead of 2 for expansion?
|
||||
if(FAILED(hr = pXAudio2->CreateMasteringVoice(&pMasteringVoice, 2, m_mixer->GetSampleRate())))
|
||||
{
|
||||
PanicAlert("XAudio2 master voice creation failed: %#X", hr);
|
||||
PanicAlertT("XAudio2 master voice creation failed: %#X", hr);
|
||||
safe_release(pXAudio2);
|
||||
CoUninitialize();
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user