summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/winres
diff options
context:
space:
mode:
authorSimon Rettberg2018-10-19 15:02:56 +0200
committerSimon Rettberg2018-10-19 15:02:56 +0200
commitd6371a280145bf2a43ec768f3e99d9f0d9e0c72c (patch)
treecd54a6c7656dbba83c15a566756f54b089394461 /core/modules/run-virt/winres
parent[run-virt] Create empty line if pwdeamon is down (diff)
downloadmltk-d6371a280145bf2a43ec768f3e99d9f0d9e0c72c.tar.gz
mltk-d6371a280145bf2a43ec768f3e99d9f0d9e0c72c.tar.xz
mltk-d6371a280145bf2a43ec768f3e99d9f0d9e0c72c.zip
[run-virt] Support $SLX_VM_MUTED to toggle automute
openslx.ini: [openslx] muteSound=1/0
Diffstat (limited to 'core/modules/run-virt/winres')
-rw-r--r--core/modules/run-virt/winres/src/winres.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/modules/run-virt/winres/src/winres.c b/core/modules/run-virt/winres/src/winres.c
index 572dbfe8..851150f7 100644
--- a/core/modules/run-virt/winres/src/winres.c
+++ b/core/modules/run-virt/winres/src/winres.c
@@ -386,8 +386,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
_debug = TRUE;
alog("Windows Version %d.%d", (int)winVer.dwMajorVersion, (int)winVer.dwMinorVersion);
}
- // Mute sound by default
- if (retVer && winVer.dwMajorVersion >= 6)
+ // Mute sound?
+ BOOL mute = GetPrivateProfileIntA("openslx", "muteSound", 1, SETTINGS_FILE) != 0;
+ if (mute && retVer && winVer.dwMajorVersion >= 6)
muteSound();
// Disable screen saver as it might give the false impression that the session is securely locked
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0);