[SHIMGVW] Display filename in taskbar even if the file isn't loaded (#5379)

If the file could not be loaded, its name wasn't displayed in the taskbar.
Now, always display the file name in all cases.

CORE-18954
This commit is contained in:
Yukinari Mitsu 2023-07-02 01:22:03 +09:00 committed by GitHub
parent 4328b858e5
commit 3801acb914
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -524,9 +524,10 @@ pLoadImageFromNode(SHIMGVW_FILENODE *node, HWND hwnd)
pLoadImage(node->FileName);
LoadStringW(hInstance, IDS_APPTITLE, szResStr, _countof(szResStr));
if (image != NULL)
pchFileTitle = PathFindFileNameW(node->FileName);
if (pchFileTitle && *pchFileTitle)
{
pchFileTitle = PathFindFileNameW(node->FileName);
StringCbPrintfW(szTitleBuf, sizeof(szTitleBuf),
L"%ls%ls%ls", szResStr, L" - ", pchFileTitle);
SetWindowTextW(hwnd, szTitleBuf);