From 9fa048519fab2a75613857243748e7a061ef9844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 14 Jul 2022 13:21:03 +0200 Subject: Prevent rating column from being invisible. Bug introduced in 26f70ab. DataListView was initialized with g_iDPI set to -1, which is obviously incorrect. The default value of -1 is a remnant of earlier code and is no longer necessary. --- c/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'c') diff --git a/c/main.cpp b/c/main.cpp index 3cfe2d6..f2172ba 100644 --- a/c/main.cpp +++ b/c/main.cpp @@ -23,7 +23,7 @@ int g_bThemes = 0; int g_bViewTVOriginal = 1; int g_bViewWatched = 1; int g_bThread = 0; -int g_iDPI = -1; +int g_iDPI = 96; static int g_cxVScroll; static LRESULT CALLBACK CBTProc(int, WPARAM, LPARAM); static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); @@ -145,8 +145,6 @@ CBTProc(int nCode, WPARAM wParam, LPARAM lParam) * initializes global variables that are used by WndProc. */ g_hWnd = (HWND)wParam; - g_lpDlv = new DataListView; - g_lpElv = new EpisodeListView; /* Get DPI. */ UINT (*GetDpiForWindow)(HWND); @@ -154,8 +152,11 @@ CBTProc(int nCode, WPARAM wParam, LPARAM lParam) if (hModule && (GetDpiForWindow = (UINT (*)(HWND))GetProcAddress(hModule, "GetDpiForWindow"))) { g_iDPI = GetDpiForWindow(g_hWnd); FreeLibrary(hModule); - } else - g_iDPI = 96; + } + + /* Create child windows. */ + g_lpDlv = new DataListView; + g_lpElv = new EpisodeListView; /* Get saved view settings. */ char *sz; -- cgit v1.2.3