aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-24 03:01:10 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-24 03:01:10 +0200
commitccb7d14a8b1ad6d80308c14a3f0b209d66c3c88d (patch)
treedb79708df0f22a9cb721bbadb644bbcb5f6e975b /c/episodelistview.cpp
parent9c237e1537238ebe95289ed6df82f6d43c482944 (diff)
downloadEpisodeBrowser-ccb7d14a8b1ad6d80308c14a3f0b209d66c3c88d.tar.gz
Add FetchScreenwriters. Improve thread communication.
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp7
1 files changed, 4 insertions, 3 deletions
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<size_t>(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<LPARAM>(disp));
+ Status(disp, 1);
}
Sort();