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 <iconv.h>
#include <system/stacktrace.h>
#include <ctime>
#include <iomanip>
//NI InfoIcons
#include <gui/infoicons.h>
@@ -3256,11 +3254,13 @@ void CMoviePlayerGui::makeScreenShot(bool autoshot, bool forcover)
cover = false;
autoshot = false;
forcover = false;
std::time_t t = std::time(NULL);
std::tm tm = *std::localtime(&t);
std::stringstream ss;
ss << std::put_time(&tm, "%Y%m%d_%H%M%S");
tmp_str = ss.str();
struct timeval tv;
gettimeofday(&tv, NULL);
char buf_time[128];
strftime(buf_time, sizeof(buf_time) , "_%Y%m%d_%H%M%S", localtime(&tv.tv_sec));
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;
std::string::size_type pos = fname.find_last_of('.');