summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSimon Rettberg2018-10-22 11:33:55 +0200
committerSimon Rettberg2018-10-22 11:33:55 +0200
commitd4cc454a34be6966f8297153063524ed9c19b3e3 (patch)
tree60f0ffa95bf396e7982a73f063549a37d6a35595 /core
parent[run-virt] Support $SLX_VM_MUTED to toggle automute (diff)
downloadmltk-d4cc454a34be6966f8297153063524ed9c19b3e3.tar.gz
mltk-d4cc454a34be6966f8297153063524ed9c19b3e3.tar.xz
mltk-d4cc454a34be6966f8297153063524ed9c19b3e3.zip
[run-virt] Explicitly unmute if muteSound=0
Diffstat (limited to 'core')
-rwxr-xr-xcore/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exebin55296 -> 55296 bytes
-rw-r--r--core/modules/run-virt/winres/src/winres.c10
2 files changed, 5 insertions, 5 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe b/core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe
index e8b87aa9..a547ddd2 100755
--- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe
+++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe
Binary files differ
diff --git a/core/modules/run-virt/winres/src/winres.c b/core/modules/run-virt/winres/src/winres.c
index 851150f7..27a3c9af 100644
--- a/core/modules/run-virt/winres/src/winres.c
+++ b/core/modules/run-virt/winres/src/winres.c
@@ -85,7 +85,7 @@ static BOOL _createMissingRemap = FALSE;
static void setPowerState();
static int setResolution();
-static int muteSound();
+static int muteSound(BOOL bMute);
static int setShutdownText();
static void readShareFile();
static BOOL mountNetworkShares();
@@ -388,8 +388,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
}
// Mute sound?
BOOL mute = GetPrivateProfileIntA("openslx", "muteSound", 1, SETTINGS_FILE) != 0;
- if (mute && retVer && winVer.dwMajorVersion >= 6)
- muteSound();
+ if (retVer && winVer.dwMajorVersion >= 6)
+ muteSound(mute);
// Disable screen saver as it might give the false impression that the session is securely locked
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0);
// Same with standby
@@ -612,7 +612,7 @@ static int setResolution()
return 0;
}
-static int muteSound()
+static int muteSound(BOOL bMute)
{
IMMDeviceEnumerator *deviceEnumerator = NULL;
HRESULT hr = CoCreateInstance(&ID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &ID_IMMDeviceEnumerator, (LPVOID *)&deviceEnumerator);
@@ -639,7 +639,7 @@ static int muteSound()
//defaultDevice->lpVtbl->Release(defaultDevice);
float targetVolume = 1;
endpointVolume->lpVtbl->SetMasterVolumeLevelScalar(endpointVolume, targetVolume, NULL);
- endpointVolume->lpVtbl->SetMute(endpointVolume, TRUE, NULL);
+ endpointVolume->lpVtbl->SetMute(endpointVolume, bMute, NULL);
//endpointVolume->lpVtbl->Release(endpointVolume);
//CoUninitialize();
return 0;