aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-14 13:21:03 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-14 13:21:03 +0200
commit9fa048519fab2a75613857243748e7a061ef9844 (patch)
tree2b6e7f548e94894d959285ed917b7f93630e11d6 /c
parent96f0accc818ad98abcb0d37e53d0a31e08ce4987 (diff)
downloadEpisodeBrowser-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')
-rw-r--r--c/main.cpp11
1 files changed, 6 insertions, 5 deletions
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;