mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 03:35:26 +00:00
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:
parent
16a9e33b85
commit
69055f8d42
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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() {}
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user