From d7f4c01579a80a812ec565d189cab8bd97ac45f5 Mon Sep 17 00:00:00 2001 From: "alexander@steinhoefer.net" Date: Thu, 17 Feb 2022 10:06:23 +0100 Subject: [PATCH] Upgraded to VS2022. Added new structure for tracking mute status --- ScreensaverNotify/ScreensaverNotify.vcxproj | 8 ++++---- ScreensaverNotify32/ScreensaverNotify32.vcxproj | 8 ++++---- ScreensaverProxy32/ScreensaverProxy32.vcxproj | 8 ++++---- WinMute/StdAfx.h | 2 ++ WinMute/WinMute.cpp | 6 +++++- WinMute/WinMute.h | 7 +++++++ WinMute/WinMute.vcxproj | 16 ++++++++-------- 7 files changed, 34 insertions(+), 21 deletions(-) diff --git a/ScreensaverNotify/ScreensaverNotify.vcxproj b/ScreensaverNotify/ScreensaverNotify.vcxproj index ca3d3f5..2206de8 100644 --- a/ScreensaverNotify/ScreensaverNotify.vcxproj +++ b/ScreensaverNotify/ScreensaverNotify.vcxproj @@ -29,21 +29,21 @@ DynamicLibrary true - v142 + v143 Unicode Spectre DynamicLibrary true - v142 + v143 Unicode Spectre DynamicLibrary false - v142 + v143 true Unicode Spectre @@ -51,7 +51,7 @@ DynamicLibrary false - v142 + v143 true Unicode Spectre diff --git a/ScreensaverNotify32/ScreensaverNotify32.vcxproj b/ScreensaverNotify32/ScreensaverNotify32.vcxproj index 05a2ac6..86783e1 100644 --- a/ScreensaverNotify32/ScreensaverNotify32.vcxproj +++ b/ScreensaverNotify32/ScreensaverNotify32.vcxproj @@ -29,14 +29,14 @@ DynamicLibrary true - v142 + v143 Unicode Spectre DynamicLibrary false - v142 + v143 true Unicode Spectre @@ -44,14 +44,14 @@ DynamicLibrary true - v142 + v143 Unicode Spectre DynamicLibrary false - v142 + v143 true Unicode Spectre diff --git a/ScreensaverProxy32/ScreensaverProxy32.vcxproj b/ScreensaverProxy32/ScreensaverProxy32.vcxproj index cf96a5f..5eeda92 100644 --- a/ScreensaverProxy32/ScreensaverProxy32.vcxproj +++ b/ScreensaverProxy32/ScreensaverProxy32.vcxproj @@ -29,14 +29,14 @@ Application true - v142 + v143 MultiByte Spectre Application false - v142 + v143 true MultiByte Spectre @@ -44,14 +44,14 @@ Application true - v142 + v143 MultiByte Spectre Application false - v142 + v143 true MultiByte Spectre diff --git a/WinMute/StdAfx.h b/WinMute/StdAfx.h index a899a21..f914dc8 100644 --- a/WinMute/StdAfx.h +++ b/WinMute/StdAfx.h @@ -49,6 +49,7 @@ POSSIBILITY OF SUCH DAMAGE. #define _WIN32_WINNT 0x0601 #include +#include #include #include #include @@ -57,6 +58,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include diff --git a/WinMute/WinMute.cpp b/WinMute/WinMute.cpp index 1113d71..68cba13 100644 --- a/WinMute/WinMute.cpp +++ b/WinMute/WinMute.cpp @@ -83,7 +83,11 @@ WinMute::WinMute() : hTrayIcon_(nullptr), wasAlreadyMuted_(false), muteCounter_(0) -{ } +{ + muteCfg_["locked"] = { false, false }; + muteCfg_["screensaver"] = { false, false }; + muteCfg_["remote_session"] = { false, false }; +} WinMute::~WinMute() { diff --git a/WinMute/WinMute.h b/WinMute/WinMute.h index 71b4362..5994783 100644 --- a/WinMute/WinMute.h +++ b/WinMute/WinMute.h @@ -55,6 +55,13 @@ public: // for internal use LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); private: + struct MuteConfigItem { + bool shouldMute; + bool isActive; + }; + + std::unordered_map muteCfg_; + HWND hWnd_; HMENU hTrayMenu_; HICON hAppIcon_; diff --git a/WinMute/WinMute.vcxproj b/WinMute/WinMute.vcxproj index 23b7c2e..b46bde6 100644 --- a/WinMute/WinMute.vcxproj +++ b/WinMute/WinMute.vcxproj @@ -29,26 +29,26 @@ Application Unicode true - v142 + v143 Spectre Application Unicode true - v142 + v143 Spectre Application Unicode - v142 + v143 Spectre Application Unicode - v142 + v143 Spectre @@ -129,7 +129,7 @@ true true Caret - stdcpp17 + stdcpp20 strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies) @@ -152,7 +152,7 @@ true Caret true - stdcpp17 + stdcpp20 strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies) @@ -178,7 +178,7 @@ Caret Guard - stdcpp17 + stdcpp20 strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies) @@ -210,7 +210,7 @@ true true Guard - stdcpp17 + stdcpp20 strsafe.lib;comctl32.lib;WtsApi32.lib;Winmm.lib;%(AdditionalDependencies) -- 2.43.0