From 4d33e5a476f6d3f7ef6ae38e28401fef9102396a Mon Sep 17 00:00:00 2001 From: lx-s Date: Fri, 29 Sep 2023 08:48:50 +0200 Subject: [PATCH 1/2] Fixed crash on signout Fixes #25 --- WinMute/MuteControl.cpp | 2 +- WinMute/WinMute.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/WinMute/MuteControl.cpp b/WinMute/MuteControl.cpp index 87937e9..77bfb65 100644 --- a/WinMute/MuteControl.cpp +++ b/WinMute/MuteControl.cpp @@ -68,7 +68,7 @@ static LRESULT CALLBACK MuteControlWndProc( WPARAM wParam, LPARAM lParam) { - auto wm = reinterpret_cast(GetWindowLongPtr(hWnd, GWLP_USERDATA)); + auto wm = reinterpret_cast(GetWindowLongPtr(hWnd, GWLP_USERDATA)); switch (msg) { case WM_NCCREATE: { diff --git a/WinMute/WinMute.cpp b/WinMute/WinMute.cpp index e2eb95e..7cad7a9 100644 --- a/WinMute/WinMute.cpp +++ b/WinMute/WinMute.cpp @@ -542,10 +542,14 @@ LRESULT CALLBACK WinMute::WindowProc( } return TRUE; case WM_QUERYENDSESSION: - if (lParam == 0) { // Shutdown - muteCtrl_.NotifyShutdown(); - } else if ((lParam & ENDSESSION_LOGOFF)) { - muteCtrl_.NotifyLogout(); + return TRUE; + case WM_ENDSESSION: + if (wParam == TRUE) { + if (lParam == 0) { // Shutdown + muteCtrl_.NotifyShutdown(); + } else if ((lParam & ENDSESSION_LOGOFF)) { + muteCtrl_.NotifyLogout(); + } } break; case WM_WINMUTE_QUIETHOURS_START: From b9c53435accf51e8d28cbbf56cd23070d51c6138 Mon Sep 17 00:00:00 2001 From: lx-s Date: Fri, 29 Sep 2023 08:51:01 +0200 Subject: [PATCH 2/2] Bumped version number to 2.4.1.0 --- Dist/InnoSetup/winmute-setup.iss | 2 +- Dist/bin/changelog.txt | 3 +++ Dist/bin/liesmich.html | 4 ++-- Dist/bin/readme.html | 4 ++-- Dist/chocolatey/WinMute.nuspec | 4 ++-- WinMute/WinMute.rc | 12 ++++++------ 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Dist/InnoSetup/winmute-setup.iss b/Dist/InnoSetup/winmute-setup.iss index c8c098c..2bff0ab 100644 --- a/Dist/InnoSetup/winmute-setup.iss +++ b/Dist/InnoSetup/winmute-setup.iss @@ -1,5 +1,5 @@ #define MyAppName "WinMute" -#define MyAppVersion "2.4.0.0" +#define MyAppVersion "2.4.1.0" #define MyAppPublisher "LX-Systems" #define MyAppURL "https://www.lx-s.de/winmute" #define MyAppExeName "WinMute.exe" diff --git a/Dist/bin/changelog.txt b/Dist/bin/changelog.txt index ff8a6ba..50b324f 100644 --- a/Dist/bin/changelog.txt +++ b/Dist/bin/changelog.txt @@ -1,3 +1,6 @@ +Version 2.4.1 (2023-09-29) + * Fixes crash on signout and shutdown + Version 2.4.0 (2023-09-22) * Added the option to delay muting by a configurable amount of seconds. diff --git a/Dist/bin/liesmich.html b/Dist/bin/liesmich.html index 2013f2f..f0c8448 100644 --- a/Dist/bin/liesmich.html +++ b/Dist/bin/liesmich.html @@ -2,7 +2,7 @@ - WinMute 2.4.0 - Lies mich + WinMute 2.4.1 - Lies mich -

WinMute 2.4.0

+

WinMute 2.4.1

Über

diff --git a/Dist/bin/readme.html b/Dist/bin/readme.html index 0ff2478..84a96c9 100644 --- a/Dist/bin/readme.html +++ b/Dist/bin/readme.html @@ -2,7 +2,7 @@ - WinMute 2.4.0 - Readme + WinMute 2.4.1 - Readme -

WinMute 2.4.0

+

WinMute 2.4.1

About

diff --git a/Dist/chocolatey/WinMute.nuspec b/Dist/chocolatey/WinMute.nuspec index 2963f12..b6011c3 100644 --- a/Dist/chocolatey/WinMute.nuspec +++ b/Dist/chocolatey/WinMute.nuspec @@ -3,7 +3,7 @@ winmute - 2.4.0.2023092201 + 2.4.1.2023092901 WinMute Alexander Steinhöfer Alexander Steinhöfer @@ -16,7 +16,7 @@ Automatic sound muter WinMute automatically mutes your PC volume if you lock your screen or the screensaver is running. © 2023 Alexander Steinhöfer - https://github.com/lx-s/WinMute/releases/tag/2.4.0.0 + https://github.com/lx-s/WinMute/releases/tag/2.4.1.0 https://raw.githubusercontent.com/lx-s/WinMute/main/LICENSE diff --git a/WinMute/WinMute.rc b/WinMute/WinMute.rc index fc575d4..327ff56 100644 --- a/WinMute/WinMute.rc +++ b/WinMute/WinMute.rc @@ -479,8 +479,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,4,0,0 - PRODUCTVERSION 2,4,0,0 + FILEVERSION 2,4,1,0 + PRODUCTVERSION 2,4,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -497,23 +497,23 @@ BEGIN BEGIN VALUE "CompanyName", "LX-Systems" VALUE "FileDescription", "WinMute" - VALUE "FileVersion", "2.4.0.0" + VALUE "FileVersion", "2.4.1.0" VALUE "InternalName", "WinMute.exe" VALUE "LegalCopyright", "Copyright (C) 2023, Alexander Steinhoefer" VALUE "OriginalFilename", "WinMute.exe" VALUE "ProductName", "WinMute" - VALUE "ProductVersion", "2.4.0.0" + VALUE "ProductVersion", "2.4.1.0" END BLOCK "040704b0" BEGIN VALUE "CompanyName", "LX-Systems" VALUE "FileDescription", "WinMute" - VALUE "FileVersion", "2.4.0.0" + VALUE "FileVersion", "2.4.1.0" VALUE "InternalName", "WinMute.exe" VALUE "LegalCopyright", "Copyright (C) 2023, Alexander Steinhoefer" VALUE "OriginalFilename", "WinMute.exe" VALUE "ProductName", "WinMute" - VALUE "ProductVersion", "2.4.0.0" + VALUE "ProductVersion", "2.4.1.0" END END BLOCK "VarFileInfo"