Skip to content

Commit

Permalink
Add 3fps for photo slideshow
Browse files Browse the repository at this point in the history
Existing option of 5fps is a tad too fast human consumption, while 1fps is too slow. Thus, adding a 3fps that's just nice =)
  • Loading branch information
sdneon committed Sep 10, 2023
1 parent 0a87385 commit 73ed43f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/JPEGView/JPEGView.rc
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ BEGIN
END
MENUITEM SEPARATOR
MENUITEM "Movie", IDM_MOVIE_START_FPS
MENUITEM "Playback speed\t3 fps", IDM_MOVIE_3_FPS
MENUITEM "Playback speed\t5 fps", IDM_MOVIE_5_FPS
MENUITEM "Playback speed\t5 fps", IDM_MOVIE_5_FPS
MENUITEM "Playback speed\t10 fps", IDM_MOVIE_10_FPS
MENUITEM "Playback speed\t25 fps", IDM_MOVIE_25_FPS
Expand Down
9 changes: 7 additions & 2 deletions src/JPEGView/MainDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,7 @@ void CMainDlg::ExecuteCommand(int nCommand) {
case IDM_EFFECTTIME_VERY_SLOW:
m_nTransitionTime = 125 * (1 << (nCommand - IDM_EFFECTTIME_VERY_FAST));
break;
case IDM_MOVIE_3_FPS:
case IDM_MOVIE_5_FPS:
case IDM_MOVIE_10_FPS:
case IDM_MOVIE_25_FPS:
Expand Down Expand Up @@ -3221,7 +3222,7 @@ void CMainDlg::GotoImage(EImagePosition ePos, int nFlags) {
while (::PeekMessage(&msg, this->m_hWnd, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE));
}

if (!m_pCurrentImage && (_tcscmp(strPrevImage, m_pFileList->Current()) == 0))
if (!m_pCurrentImage && strPrevImage && (_tcscmp(strPrevImage, m_pFileList->Current()) == 0))
{
if (++m_nImageRetryCnt < 2)
{
Expand Down Expand Up @@ -3613,8 +3614,10 @@ void CMainDlg::AdjustMovieSpeed(double dIncrement)
dFPS = 25.0;
else if (dFPS >= 5.0)
dFPS = 10.0;
else if (dFPS >= 1.0)
else if (dFPS >= 3.0)
dFPS = 5.0;
else if (dFPS >= 1.0)
dFPS = 3.0;
else if (dFPS >= 0.5)
dFPS = 1.0;
else if (dFPS >= 0.32)
Expand Down Expand Up @@ -3649,6 +3652,8 @@ void CMainDlg::AdjustMovieSpeed(double dIncrement)
else if (dFPS >= 10.0)
dFPS = 5.0;
else if (dFPS >= 5.0)
dFPS = 3.0;
else if (dFPS >= 3.0)
dFPS = 1.0;
else if (dFPS >= 1.0)
dFPS = 0.5;
Expand Down
1 change: 1 addition & 0 deletions src/JPEGView/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
#define IDM_EFFECTTIME_SLOW 7473
#define IDM_EFFECTTIME_VERY_SLOW 7474
#define IDM_MOVIE_START_FPS 7500 // Pseudo entry
#define IDM_MOVIE_3_FPS 7503
#define IDM_MOVIE_5_FPS 7505
#define IDM_MOVIE_10_FPS 7510
#define IDM_MOVIE_25_FPS 7525
Expand Down

0 comments on commit 73ed43f

Please sign in to comment.