movieplayer: fix compiler warning: ‘int ftime(timeb*)’ is deprecated

Origin commit data
------------------
Commit: 32775394fc
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-01-24 (Tue, 24 Jan 2023)

Origin message was:
------------------
- movieplayer: fix compiler warning: ‘int ftime(timeb*)’ is deprecated
This commit is contained in:
vanhofen
2023-01-24 22:54:56 +01:00
parent 4d9a701dda
commit 47b7e06712

View File

@@ -2651,10 +2651,9 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
// if we have a movie information, try to save the stop position // if we have a movie information, try to save the stop position
printf("CMoviePlayerGui::handleMovieBrowser: stop, isMovieBrowser %d p_movie_info %p\n", isMovieBrowser, p_movie_info); printf("CMoviePlayerGui::handleMovieBrowser: stop, isMovieBrowser %d p_movie_info %p\n", isMovieBrowser, p_movie_info);
if (isMovieBrowser && p_movie_info) { if (isMovieBrowser && p_movie_info) {
timeb current_time; timeval current_time;
ftime(&current_time); gettimeofday(&current_time, NULL);
p_movie_info->dateOfLastPlay = current_time.time; p_movie_info->dateOfLastPlay = current_time.tv_sec;
current_time.time = time(NULL);
p_movie_info->bookmarks.lastPlayStop = position / 1000; p_movie_info->bookmarks.lastPlayStop = position / 1000;
if (p_movie_info->length == 0) { if (p_movie_info->length == 0) {
p_movie_info->length = (float)duration / 60 / 1000 + 0.5; p_movie_info->length = (float)duration / 60 / 1000 + 0.5;