mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:31:13 +02:00
Merge pull request #16067 from zfox23/fixMutedBanner
Fix BUGZ-1263 and probably BUGZ-1273: Fix input device muted banner
This commit is contained in:
commit
3b138fe031
1 changed files with 18 additions and 1 deletions
|
@ -483,7 +483,16 @@ function updateInputDeviceMutedOverlay(isMuted) {
|
||||||
|
|
||||||
|
|
||||||
function onDesktopInputDeviceMutedChanged(isMuted) {
|
function onDesktopInputDeviceMutedChanged(isMuted) {
|
||||||
updateInputDeviceMutedOverlay(isMuted);
|
if (!HMD.active) {
|
||||||
|
updateInputDeviceMutedOverlay(isMuted);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function onHMDInputDeviceMutedChanged(isMuted) {
|
||||||
|
if (HMD.active) {
|
||||||
|
updateInputDeviceMutedOverlay(isMuted);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -508,6 +517,12 @@ function onDisplayModeChanged(isHMDMode) {
|
||||||
if (isHMDMode) {
|
if (isHMDMode) {
|
||||||
Camera.setModeString("first person");
|
Camera.setModeString("first person");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isHMDMode) {
|
||||||
|
onHMDInputDeviceMutedChanged(Audio.mutedHMD);
|
||||||
|
} else {
|
||||||
|
onDesktopInputDeviceMutedChanged(Audio.mutedDesktop);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onToolbarVisibleChanged(isVisible, toolbarName) {
|
function onToolbarVisibleChanged(isVisible, toolbarName) {
|
||||||
|
@ -578,6 +593,7 @@ function startup() {
|
||||||
updateInputDeviceMutedOverlay(Audio.muted);
|
updateInputDeviceMutedOverlay(Audio.muted);
|
||||||
updateOutputDeviceMutedOverlay(isOutputMuted());
|
updateOutputDeviceMutedOverlay(isOutputMuted());
|
||||||
Audio.mutedDesktopChanged.connect(onDesktopInputDeviceMutedChanged);
|
Audio.mutedDesktopChanged.connect(onDesktopInputDeviceMutedChanged);
|
||||||
|
Audio.mutedHMDChanged.connect(onHMDInputDeviceMutedChanged);
|
||||||
Window.geometryChanged.connect(onGeometryChanged);
|
Window.geometryChanged.connect(onGeometryChanged);
|
||||||
HMD.displayModeChanged.connect(onDisplayModeChanged);
|
HMD.displayModeChanged.connect(onDisplayModeChanged);
|
||||||
Audio.avatarGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
|
Audio.avatarGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
|
||||||
|
@ -634,6 +650,7 @@ function shutdown() {
|
||||||
si.unload();
|
si.unload();
|
||||||
|
|
||||||
Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged);
|
Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged);
|
||||||
|
Audio.mutedHMDChanged.disconnect(onHMDInputDeviceMutedChanged);
|
||||||
Window.geometryChanged.disconnect(onGeometryChanged);
|
Window.geometryChanged.disconnect(onGeometryChanged);
|
||||||
HMD.displayModeChanged.disconnect(onDisplayModeChanged);
|
HMD.displayModeChanged.disconnect(onDisplayModeChanged);
|
||||||
Audio.avatarGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
|
Audio.avatarGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
|
||||||
|
|
Loading…
Reference in a new issue