Tiny crash fix for the wiimote plugin as well as a safer check for the volume in DSP HLE

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3314 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s 2009-06-03 20:09:48 +00:00
parent 16a9e33b85
commit 69055f8d42
3 changed files with 4 additions and 2 deletions

View File

@ -160,7 +160,7 @@ void DSound::SetVolume(int volume)
m_volume = (int)floor(log10((float)volume) * 5000.0f) - 10000; m_volume = (int)floor(log10((float)volume) * 5000.0f) - 10000;
soundCriticalSection.Enter(); soundCriticalSection.Enter();
if (ds != NULL) if (dsBuffer != NULL)
dsBuffer->SetVolume(m_volume); dsBuffer->SetVolume(m_volume);
soundCriticalSection.Leave(); soundCriticalSection.Leave();
} }

View File

@ -68,6 +68,8 @@ public:
, totalRenderedBytes(0) , totalRenderedBytes(0)
, currentPos(0) , currentPos(0)
, lastPos(0) , lastPos(0)
, dsBuffer(0)
, ds(0)
{} {}
virtual ~DSound() {} virtual ~DSound() {}

View File

@ -329,7 +329,7 @@ void ConfigDialog::ToBlank(bool ToBlank)
{ {
if (!ControlsCreated) return; if (!ControlsCreated) return;
for (int j = 0; j < 4; j++) for (int j = 0; j < 1; j++)
{ {
if(ToBlank) if(ToBlank)
{ {