Skip to content

Commit

Permalink
Setup: Slight fix in ProcessTaskbarDlls
Browse files Browse the repository at this point in the history
  • Loading branch information
Amrsatrio committed Feb 18, 2024
1 parent dfe340d commit 08dec82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ExplorerPatcher/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -10160,7 +10160,7 @@ int RtlQueryFeatureConfigurationHook(UINT32 featureId, int sectionType, INT64* c
{
// This feature flag when enabled makes the flyouts disregard the left and right offsets, so that they
// appear over the Copilot sidebar instead of beside it. Disabling this fixes start menu positioning
// when the taskbar is at the left or right side, but it produce that aforementioned behavior.
// when the taskbar is at the left or right side, but it will make that behavior occur again.
buffer->enabledState = FEATURE_ENABLED_STATE_DISABLED;
}
break;
Expand Down
16 changes: 7 additions & 9 deletions ep_setup/ep_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,15 +440,13 @@ BOOL DownloadResource(BOOL bInstall, LPCWSTR pwszURL, DWORD dwSize, LPCSTR chash
return bOk;
}

BOOL ProcessTaskbarDlls(BOOL bInstall, HINSTANCE hInstance, WCHAR wszPath[260], BOOL bExtractMode)
void ProcessTaskbarDlls(BOOL* bInOutOk, BOOL bInstall, BOOL bExtractMode, HINSTANCE hInstance, WCHAR wszPath[260])
{
BOOL bOk = TRUE;
LPCWSTR pwszTaskbarDllName = bExtractMode ? NULL : PickTaskbarDll();
if (bOk) bOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.2.dll")), hInstance, IDR_EP_TASKBAR_2, wszPath, L"ep_taskbar.2.dll");
if (bOk) bOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.3.dll")), hInstance, IDR_EP_TASKBAR_3, wszPath, L"ep_taskbar.3.dll");
if (bOk) bOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.4.dll")), hInstance, IDR_EP_TASKBAR_4, wszPath, L"ep_taskbar.4.dll");
if (bOk) bOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.5.dll")), hInstance, IDR_EP_TASKBAR_5, wszPath, L"ep_taskbar.5.dll");
return bOk;
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.2.dll")), hInstance, IDR_EP_TASKBAR_2, wszPath, L"ep_taskbar.2.dll");
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.3.dll")), hInstance, IDR_EP_TASKBAR_3, wszPath, L"ep_taskbar.3.dll");
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.4.dll")), hInstance, IDR_EP_TASKBAR_4, wszPath, L"ep_taskbar.4.dll");
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.5.dll")), hInstance, IDR_EP_TASKBAR_5, wszPath, L"ep_taskbar.5.dll");
}

int WINAPI wWinMain(
Expand Down Expand Up @@ -492,7 +490,7 @@ int WINAPI wWinMain(
if (bOk) bOk = InstallResource(bInstall, hInstance, IDR_MS_WEBVIEW2_LOADER, wszPath, L"WebView2Loader.dll");
if (bOk) bOk = InstallResource(bInstall, hInstance, IDR_EP_STARTMENU, wszPath, L"wincorlib.dll");
if (bOk) bOk = InstallResource(bInstall, hInstance, IDR_EP_GUI, wszPath, L"ep_gui.dll");
if (bOk) bOk = ProcessTaskbarDlls(bInstall, hInstance, wszPath, TRUE);
ProcessTaskbarDlls(&bOk, bInstall, TRUE, hInstance, wszPath);
return !bOk;
}

Expand Down Expand Up @@ -832,7 +830,7 @@ int WINAPI wWinMain(
if (bOk) bOk = InstallResource(bInstall, hInstance, IDR_EP_WEATHER_STUB, wszPath, L"ep_weather_host_stub.dll");
if (bOk) bOk = InstallResource(bInstall, hInstance, IDR_MS_WEBVIEW2_LOADER, wszPath, L"WebView2Loader.dll");
}
if (bOk) bOk = ProcessTaskbarDlls(bInstall, hInstance, wszPath, FALSE);
ProcessTaskbarDlls(&bOk, bInstall, FALSE, hInstance, wszPath);

// --------------------------------------------------------------------------------

Expand Down

0 comments on commit 08dec82

Please sign in to comment.