https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49be08bc69b8921493e731...
commit 49be08bc69b8921493e731f4be10ce1e61b51b19 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Sat Aug 15 07:08:40 2020 +0900 Commit: GitHub noreply@github.com CommitDate: Sat Aug 15 07:08:40 2020 +0900
[FONTVIEW] Fix regression; opening files won't list files (#3045)
Based on Mark Jansen's patch in CORE-17001. --- base/applications/fontview/fontview.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/base/applications/fontview/fontview.c b/base/applications/fontview/fontview.c index 8ef2a7cb98b..1ad824f786d 100644 --- a/base/applications/fontview/fontview.c +++ b/base/applications/fontview/fontview.c @@ -35,7 +35,7 @@ HINSTANCE g_hInstance; INT g_FontIndex = 0; INT g_NumFonts = 0; LOGFONTW g_LogFonts[64]; -LPCWSTR g_fileName; +LPCWSTR g_fileName = L""; WCHAR g_FontTitle[1024] = L""; BOOL g_FontPrint = FALSE; BOOL g_DisableInstall = FALSE; @@ -102,7 +102,6 @@ wWinMain(HINSTANCE hThisInstance, int argc; INT i; WCHAR** argv; - WCHAR szFileName[MAX_PATH] = L""; DWORD dwSize; HWND hMainWnd; MSG msg; @@ -125,6 +124,8 @@ wWinMain(HINSTANCE hThisInstance, argv = CommandLineToArgvW(GetCommandLineW(), &argc); if (argc < 2) { +#if 0 + WCHAR szFileName[MAX_PATH] = L""; OPENFILENAMEW fontOpen; WCHAR filter[MAX_PATH*2] = {0}, dialogTitle[MAX_PATH];
@@ -154,6 +155,7 @@ wWinMain(HINSTANCE hThisInstance, exiting the program altogether */ return 0; } +#endif } else { @@ -190,9 +192,9 @@ wWinMain(HINSTANCE hThisInstance, g_fileName = fileName; }
- if (!AddFontResourceW(fileName)) + if (!AddFontResourceW(g_fileName)) { - ErrorMsgBox(0, IDS_ERROR_NOFONT, fileName); + ErrorMsgBox(0, IDS_ERROR_NOFONT, g_fileName); return -1; }