From b6a0ef10d205f846a5204e21b0db3e9a406bfc5c Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sun, 19 Nov 2023 21:28:37 +0900 Subject: [PATCH] [STOBJECT] Remove #if 0 and #endif in Volume_IsMute (#5973) Based on KRosUser's volume.patch. The pair of #if 0 and #endif was added in 180b6fb. CORE-18583 --- dll/shellext/stobject/volume.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dll/shellext/stobject/volume.cpp b/dll/shellext/stobject/volume.cpp index 4b63e05a6b1..048197eaab1 100644 --- a/dll/shellext/stobject/volume.cpp +++ b/dll/shellext/stobject/volume.cpp @@ -111,7 +111,6 @@ static HRESULT __stdcall Volume_FindMixerControl(CSysTray * pSysTray) HRESULT Volume_IsMute() { -#if 0 MIXERCONTROLDETAILS mixerControlDetails; if (g_mixerId != (UINT)-1 && g_muteControlID != (DWORD)-1) @@ -123,14 +122,14 @@ HRESULT Volume_IsMute() mixerControlDetails.cChannels = 1; mixerControlDetails.paDetails = &detailsResult; mixerControlDetails.cbDetails = sizeof(detailsResult); - if (mixerGetControlDetailsW((HMIXEROBJ) g_mixerId, &mixerControlDetails, 0)) + if (mixerGetControlDetailsW((HMIXEROBJ)UlongToHandle(g_mixerId), &mixerControlDetails, 0)) return E_FAIL; TRACE("Obtained mute status %d\n", detailsResult); g_IsMute = detailsResult != 0; } -#endif + return S_OK; }