From 7b7fcdfef7487770d3089bafaedf467e30ed3afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 1 Apr 2022 13:29:25 +0200 Subject: Support per-monitor DPI. --- c/episodelistview.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'c/episodelistview.c') diff --git a/c/episodelistview.c b/c/episodelistview.c index 95f234a..76c99d9 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -23,7 +23,7 @@ ElvCreate() lvc.mask = LVCF_WIDTH|LVCF_TEXT|LVCF_SUBITEM; lvc.iSubItem = 0; lvc.pszText = TEXT("#"); - lvc.cx = 42; + lvc.cx = Dpi(42); ListView_InsertColumn(HElv, 0, &lvc); lvc.iSubItem = 1; @@ -117,10 +117,13 @@ ElvSelectRecent() term_t t; t = T(1); - P("track_episodes","most_recently_watched",1,t) return; + P("track_episodes","most_recently_watched",1,t) { + iEpisode = 1; + goto sel; + } GI(t,&iEpisode) return; - lvfi.flags = LVFI_PARAM; +sel: lvfi.flags = LVFI_PARAM; lvfi.lParam = iEpisode; iItem = ListView_FindItem(HElv, -1, &lvfi); -- cgit v1.2.3