mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-29 00:24:42 +01:00
VCM: unmute both cam and mic when we detect that a camera-using app has quitted
This commit is contained in:
@@ -128,6 +128,10 @@ LRESULT Toolbar::WindowProcessMessages(HWND hwnd, UINT msg, WPARAM wparam, LPARA
|
||||
{
|
||||
show = toolbar->HideToolbarWhenUnmuted ? toolbar->microphoneMuted || toolbar->cameraMuted : true;
|
||||
}
|
||||
else if (toolbar->previouscameraInUse)
|
||||
{
|
||||
VideoConferenceModule::unmuteAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
show = toolbar->microphoneMuted;
|
||||
@@ -143,7 +147,7 @@ LRESULT Toolbar::WindowProcessMessages(HWND hwnd, UINT msg, WPARAM wparam, LPARA
|
||||
}
|
||||
|
||||
KillTimer(hwnd, toolbar->nTimerId);
|
||||
|
||||
toolbar->previouscameraInUse = toolbar->cameraInUse;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -42,6 +42,7 @@ private:
|
||||
|
||||
bool cameraMuted = false;
|
||||
bool cameraInUse = false;
|
||||
bool previouscameraInUse = false;
|
||||
bool microphoneMuted = false;
|
||||
|
||||
std::wstring theme = L"system";
|
||||
|
||||
@@ -179,7 +179,7 @@ VideoConferenceModule::VideoConferenceModule()
|
||||
|
||||
inline VideoConferenceModule::~VideoConferenceModule()
|
||||
{
|
||||
unmuteAll();
|
||||
instance->unmuteAll();
|
||||
toolbar.hide();
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ void VideoConferenceModule::disable()
|
||||
}
|
||||
}
|
||||
|
||||
unmuteAll();
|
||||
instance->unmuteAll();
|
||||
toolbar.hide();
|
||||
|
||||
_enabled = false;
|
||||
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
void sendSourceCameraNameUpdate();
|
||||
void sendOverlayImageUpdate();
|
||||
|
||||
static void unmuteAll();
|
||||
static void reverseMicrophoneMute();
|
||||
static bool getMicrophoneMuteState();
|
||||
static void reverseVirtualCameraMuteState();
|
||||
@@ -54,7 +55,6 @@ public:
|
||||
static bool getVirtualCameraInUse();
|
||||
|
||||
private:
|
||||
void unmuteAll();
|
||||
void init_settings();
|
||||
void updateControlledMicrophones(const std::wstring_view new_mic);
|
||||
// all callback methods and used by callback have to be static
|
||||
|
||||
Reference in New Issue
Block a user