From 5a66fdcb438667c40589da30ce55ef0cffacb185 Mon Sep 17 00:00:00 2001 From: grimes2 Date: Thu, 27 Apr 2023 14:35:28 +0200 Subject: [PATCH] Tweak --- foo_preview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/foo_preview.cpp b/foo_preview.cpp index 0b22b03..f8b9fe5 100644 --- a/foo_preview.cpp +++ b/foo_preview.cpp @@ -244,6 +244,9 @@ class play_callback_preview : public play_callback_static { cfg_previewstart.get(preview_start); preview_start2 = atoi(preview_start); + if (preview_start2 > total_time2 - preview_time2) { + preview_start2 = total_time2 - preview_time2; + } } ptr4 = SetTimer(NULL, ID_TIMER4, 0, (TIMERPROC)PreviewTimer2); ptr3 = SetTimer(NULL, ID_TIMER3, (UINT)preview_time2 * 1000, (TIMERPROC)PreviewTimer);