diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-14 13:21:03 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-14 13:21:03 +0200 |
commit | 9fa048519fab2a75613857243748e7a061ef9844 (patch) | |
tree | 2b6e7f548e94894d959285ed917b7f93630e11d6 /c/main.cpp | |
parent | 96f0accc818ad98abcb0d37e53d0a31e08ce4987 (diff) | |
download | EpisodeBrowser-9fa048519fab2a75613857243748e7a061ef9844.tar.gz |
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.
Diffstat (limited to 'c/main.cpp')
-rw-r--r-- | c/main.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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; |