mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 06:11:51 +00:00
changes based on the @Alcaro suggestions
Suggestions made here: https://github.com/libretro/RetroArch/pull/3407
This commit is contained in:
parent
c92efacebe
commit
db204afc9c
@ -415,8 +415,7 @@ void fill_pathname_parent_dir(char *out_dir,
|
|||||||
void fill_dated_filename(char *out_filename,
|
void fill_dated_filename(char *out_filename,
|
||||||
const char *ext, size_t size)
|
const char *ext, size_t size)
|
||||||
{
|
{
|
||||||
time_t cur_time;
|
time_t cur_time = time(NULL);
|
||||||
time(&cur_time);
|
|
||||||
|
|
||||||
strftime(out_filename, size,
|
strftime(out_filename, size,
|
||||||
"RetroArch-%m%d-%H%M%S.", localtime(&cur_time));
|
"RetroArch-%m%d-%H%M%S.", localtime(&cur_time));
|
||||||
@ -440,11 +439,10 @@ void fill_str_dated_filename(char *out_filename,
|
|||||||
const char *in_str, const char *ext, size_t size)
|
const char *in_str, const char *ext, size_t size)
|
||||||
{
|
{
|
||||||
char format[256] = {0};
|
char format[256] = {0};
|
||||||
time_t cur_time;
|
time_t cur_time = time(NULL);
|
||||||
time(&cur_time);
|
|
||||||
|
|
||||||
strncpy(out_filename, in_str, size);
|
|
||||||
strftime(format, sizeof(format), "-%y%m%d-%H%M%S.", localtime(&cur_time));
|
strftime(format, sizeof(format), "-%y%m%d-%H%M%S.", localtime(&cur_time));
|
||||||
|
strlcpy(out_filename, in_str, size);
|
||||||
strlcat(out_filename, format, size);
|
strlcat(out_filename, format, size);
|
||||||
strlcat(out_filename, ext, size);
|
strlcat(out_filename, ext, size);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user