1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-02-17 19:09:25 +01:00

Protect taskbar style state variable from changing once its setting is read from the registry

This commit is contained in:
Valentin Radu 2022-01-04 01:49:22 +02:00
parent 0204a6b41c
commit 065acae2c4

View File

@ -47,6 +47,7 @@ BOOL bIsExplorerProcess = FALSE;
BOOL bInstanced = FALSE;
HWND archivehWnd;
DWORD bOldTaskbar = TRUE;
DWORD bWasOldTaskbarSet = FALSE;
DWORD bAllocConsole = FALSE;
DWORD bHideExplorerSearchBar = FALSE;
DWORD bMicaEffectOnTitlebar = FALSE;
@ -4152,15 +4153,21 @@ void WINAPI LoadSettings(LPARAM lParam)
RegCloseKey(hKey);
return;
}
dwTemp = TRUE;
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
TEXT("OldTaskbar"),
0,
NULL,
&bOldTaskbar,
&dwTemp,
&dwSize
);
if (!bWasOldTaskbarSet)
{
bOldTaskbar = dwTemp;
bWasOldTaskbarSet = TRUE;
}
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,