use strftime instead of std::put_time, for sh4 build

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5c247c0d1b
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-03-18 (Mon, 18 Mar 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2019-03-18 18:37:10 +01:00
committed by vanhofen
parent 17b2d980bf
commit 84da8e8902

View File

@@ -80,8 +80,6 @@
#include <algorithm> #include <algorithm>
#include <iconv.h> #include <iconv.h>
#include <system/stacktrace.h> #include <system/stacktrace.h>
#include <ctime>
#include <iomanip>
//NI InfoIcons //NI InfoIcons
#include <gui/infoicons.h> #include <gui/infoicons.h>
@@ -3256,11 +3254,13 @@ void CMoviePlayerGui::makeScreenShot(bool autoshot, bool forcover)
cover = false; cover = false;
autoshot = false; autoshot = false;
forcover = false; forcover = false;
std::time_t t = std::time(NULL); struct timeval tv;
std::tm tm = *std::localtime(&t); gettimeofday(&tv, NULL);
std::stringstream ss; char buf_time[128];
ss << std::put_time(&tm, "%Y%m%d_%H%M%S"); strftime(buf_time, sizeof(buf_time) , "_%Y%m%d_%H%M%S", localtime(&tv.tv_sec));
tmp_str = ss.str(); size_t pos = strlen(buf_time);
snprintf(&(buf_time[pos]), sizeof(buf_time) - pos - 1, "_%03d", (int) tv.tv_usec/1000);
tmp_str = buf_time;
} }
tmp_str += ending; tmp_str += ending;
std::string::size_type pos = fname.find_last_of('.'); std::string::size_type pos = fname.find_last_of('.');