fActiveVolume should always be set, and only switch volumes if needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27666 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "AutoDeleter.h"
|
||||
#include "ControllerView.h"
|
||||
#include "MainApp.h"
|
||||
#include "PlaybackState.h"
|
||||
#include "Settings.h"
|
||||
#include "VideoView.h"
|
||||
@@ -332,22 +333,23 @@ Controller::PlayerActivated(bool active)
|
||||
{
|
||||
BAutolock _(this);
|
||||
|
||||
if (active) {
|
||||
if (active && gMainApp->PlayerCount() > 1) {
|
||||
if (fActiveVolume != fVolume)
|
||||
SetVolume(fActiveVolume);
|
||||
} else {
|
||||
fActiveVolume = fVolume;
|
||||
switch (fBackgroundMovieVolumeMode) {
|
||||
case mpSettings::BG_MOVIES_MUTED:
|
||||
SetVolume(0.0);
|
||||
break;
|
||||
case mpSettings::BG_MOVIES_HALF_VLUME:
|
||||
SetVolume(fVolume * 0.25);
|
||||
break;
|
||||
case mpSettings::BG_MOVIES_FULL_VOLUME:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (gMainApp->PlayerCount() > 1)
|
||||
switch (fBackgroundMovieVolumeMode) {
|
||||
case mpSettings::BG_MOVIES_MUTED:
|
||||
SetVolume(0.0);
|
||||
break;
|
||||
case mpSettings::BG_MOVIES_HALF_VLUME:
|
||||
SetVolume(fVolume * 0.25);
|
||||
break;
|
||||
case mpSettings::BG_MOVIES_FULL_VOLUME:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -701,7 +701,7 @@ MainWin::WindowActivated(bool active)
|
||||
MoveBy(diffX, diffY);
|
||||
}
|
||||
|
||||
fController->PlayerActivated(active || gMainApp->PlayerCount() <= 1);
|
||||
fController->PlayerActivated(active);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user