mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 18:31:22 +02:00
use strftime instead of std::put_time, for sh4 build
This commit is contained in:
@@ -80,8 +80,6 @@
|
||||
#include <algorithm>
|
||||
#include <iconv.h>
|
||||
#include <system/stacktrace.h>
|
||||
#include <ctime>
|
||||
#include <iomanip>
|
||||
|
||||
#if 0
|
||||
#include <gui/infoicons.h>
|
||||
@@ -3227,11 +3225,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('.');
|
||||
|
Reference in New Issue
Block a user