From ccb7d14a8b1ad6d80308c14a3f0b209d66c3c88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 24 Aug 2022 03:01:10 +0200 Subject: Add FetchScreenwriters. Improve thread communication. --- c/episodelistview.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'c/episodelistview.cpp') diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index 645c11f..cadd751 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -281,7 +281,9 @@ void EpisodeListView::SelectUnwatched(int dir) iEpNew = lvfi.lParam; for (;;) { iEpNew += dir; - if (iEpNew == 0 || iEpNew == g_cfg.cEp || !g_fvElv[iEpNew-1].siEp[0]) + if (iEpNew == 0 + || static_cast(iEpNew) > g_fvElv.c + || !g_fvElv[iEpNew-1].siEp[0]) return; if (!g_fvElv[iEpNew-1].bWatched) break; @@ -421,10 +423,9 @@ void EpisodeListView::Update() } /* Show number of displayed items in status bar. */ - extern HWND g_hWndStatus; wchar_t disp[16]; Swprintf(disp, L"%d", cItem); - SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(1,0), reinterpret_cast(disp)); + Status(disp, 1); } Sort(); -- cgit v1.2.3