* Add TODO/FIXME localize notes
* More snprintf optimizations
This commit is contained in:
parent
907efccb05
commit
c087b044c2
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <compat/strl.h>
|
||||||
#include <file/file_path.h>
|
#include <file/file_path.h>
|
||||||
#include <file/config_file_userdata.h>
|
#include <file/config_file_userdata.h>
|
||||||
#include <lists/dir_list.h>
|
#include <lists/dir_list.h>
|
||||||
|
@ -138,12 +139,8 @@ static bool create_softfilter_graph(rarch_softfilter_t *filt,
|
||||||
unsigned input_fmts, input_fmt, output_fmts, i = 0;
|
unsigned input_fmts, input_fmt, output_fmts, i = 0;
|
||||||
struct config_file_userdata userdata;
|
struct config_file_userdata userdata;
|
||||||
char key[64], name[64];
|
char key[64], name[64];
|
||||||
|
name[0] = '\0';
|
||||||
(void)i;
|
strlcpy(key, "filter", sizeof(key));
|
||||||
|
|
||||||
key[0] = name[0] = '\0';
|
|
||||||
|
|
||||||
snprintf(key, sizeof(key), "filter");
|
|
||||||
|
|
||||||
if (!config_get_array(filt->conf, key, name, sizeof(name)))
|
if (!config_get_array(filt->conf, key, name, sizeof(name)))
|
||||||
{
|
{
|
||||||
|
@ -157,21 +154,20 @@ static bool create_softfilter_graph(rarch_softfilter_t *filt,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
filt->impl = softfilter_find_implementation(filt, name);
|
if (!(filt->impl = softfilter_find_implementation(filt, name)))
|
||||||
if (!filt->impl)
|
|
||||||
{
|
{
|
||||||
RARCH_ERR("Could not find implementation.\n");
|
RARCH_ERR("Could not find implementation.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
userdata.conf = filt->conf;
|
userdata.conf = filt->conf;
|
||||||
/* Index-specific configs take priority over ident-specific. */
|
/* Index-specific configs take priority over ident-specific. */
|
||||||
userdata.prefix[0] = key;
|
userdata.prefix[0] = key;
|
||||||
userdata.prefix[1] = filt->impl->short_ident;
|
userdata.prefix[1] = filt->impl->short_ident;
|
||||||
|
|
||||||
/* Simple assumptions. */
|
/* Simple assumptions. */
|
||||||
filt->pix_fmt = in_pixel_format;
|
filt->pix_fmt = in_pixel_format;
|
||||||
input_fmts = filt->impl->query_input_formats();
|
input_fmts = filt->impl->query_input_formats();
|
||||||
|
|
||||||
switch (in_pixel_format)
|
switch (in_pixel_format)
|
||||||
{
|
{
|
||||||
|
@ -331,12 +327,8 @@ static bool append_softfilter_plugs(rarch_softfilter_t *filt,
|
||||||
unsigned i;
|
unsigned i;
|
||||||
softfilter_simd_mask_t mask = (softfilter_simd_mask_t)cpu_features_get();
|
softfilter_simd_mask_t mask = (softfilter_simd_mask_t)cpu_features_get();
|
||||||
|
|
||||||
(void)list;
|
if (!(filt->plugs = (struct rarch_soft_plug*)
|
||||||
|
calloc(ARRAY_SIZE(soft_plugs_builtin), sizeof(*filt->plugs))))
|
||||||
filt->plugs = (struct rarch_soft_plug*)
|
|
||||||
calloc(ARRAY_SIZE(soft_plugs_builtin), sizeof(*filt->plugs));
|
|
||||||
|
|
||||||
if (!filt->plugs)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
filt->num_plugs = ARRAY_SIZE(soft_plugs_builtin);
|
filt->num_plugs = ARRAY_SIZE(soft_plugs_builtin);
|
||||||
|
|
|
@ -2522,19 +2522,19 @@ void input_config_get_bind_string_joykey(
|
||||||
switch (GET_HAT_DIR(bind->joykey))
|
switch (GET_HAT_DIR(bind->joykey))
|
||||||
{
|
{
|
||||||
case HAT_UP_MASK:
|
case HAT_UP_MASK:
|
||||||
snprintf(buf + len, size - len, "up (%s)", na_str);
|
snprintf(buf + len, size - len, "up (%s)", na_str);
|
||||||
break;
|
break;
|
||||||
case HAT_DOWN_MASK:
|
case HAT_DOWN_MASK:
|
||||||
snprintf(buf + len, size - len, "down (%s)", na_str);
|
snprintf(buf + len, size - len, "down (%s)", na_str);
|
||||||
break;
|
break;
|
||||||
case HAT_LEFT_MASK:
|
case HAT_LEFT_MASK:
|
||||||
snprintf(buf + len, size - len, "left (%s)", na_str);
|
snprintf(buf + len, size - len, "left (%s)", na_str);
|
||||||
break;
|
break;
|
||||||
case HAT_RIGHT_MASK:
|
case HAT_RIGHT_MASK:
|
||||||
snprintf(buf + len, size - len, "right (%s)",na_str);
|
snprintf(buf + len, size - len, "right (%s)", na_str);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
snprintf(buf + len, size - len, "? (%s)", na_str);
|
snprintf(buf + len, size - len, "? (%s)", na_str);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2583,17 +2583,17 @@ void input_config_get_bind_string_joyaxis(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *na_str =
|
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE);
|
|
||||||
if (AXIS_NEG_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
if (AXIS_NEG_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
||||||
{
|
{
|
||||||
unsigned axis = AXIS_NEG_GET(bind->joyaxis);
|
unsigned axis = AXIS_NEG_GET(bind->joyaxis);
|
||||||
snprintf(buf, size, "%s-%u (%s)", prefix, axis, na_str);
|
snprintf(buf, size, "%s-%u (%s)", prefix, axis,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
|
||||||
}
|
}
|
||||||
else if (AXIS_POS_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
else if (AXIS_POS_GET(bind->joyaxis) != AXIS_DIR_NONE)
|
||||||
{
|
{
|
||||||
unsigned axis = AXIS_POS_GET(bind->joyaxis);
|
unsigned axis = AXIS_POS_GET(bind->joyaxis);
|
||||||
snprintf(buf, size, "%s+%u (%s)", prefix, axis, na_str);
|
snprintf(buf, size, "%s+%u (%s)", prefix, axis,
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5401,6 +5401,7 @@ bool menu_input_key_bind_iterate(
|
||||||
uint64_t input_bind_hold_us = settings->uints.input_bind_hold * 1000000;
|
uint64_t input_bind_hold_us = settings->uints.input_bind_hold * 1000000;
|
||||||
uint64_t input_bind_timeout_us = settings->uints.input_bind_timeout * 1000000;
|
uint64_t input_bind_timeout_us = settings->uints.input_bind_timeout * 1000000;
|
||||||
|
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(bind->s, bind->len,
|
snprintf(bind->s, bind->len,
|
||||||
"[%s]\nPress keyboard, mouse or joypad\n(Timeout %d %s)",
|
"[%s]\nPress keyboard, mouse or joypad\n(Timeout %d %s)",
|
||||||
input_config_bind_map_get_desc(
|
input_config_bind_map_get_desc(
|
||||||
|
@ -5490,6 +5491,7 @@ bool menu_input_key_bind_iterate(
|
||||||
new_binds.timer_hold.timeout_us =
|
new_binds.timer_hold.timeout_us =
|
||||||
new_binds.timer_hold.timeout_end - current_time;
|
new_binds.timer_hold.timeout_end - current_time;
|
||||||
|
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(bind->s, bind->len,
|
snprintf(bind->s, bind->len,
|
||||||
"[%s]\nPress keyboard, mouse or joypad\nand hold ...",
|
"[%s]\nPress keyboard, mouse or joypad\nand hold ...",
|
||||||
input_config_bind_map_get_desc(
|
input_config_bind_map_get_desc(
|
||||||
|
|
47
runloop.c
47
runloop.c
|
@ -674,6 +674,7 @@ void runloop_runtime_log_deinit(
|
||||||
runloop_st->core_runtime_usec,
|
runloop_st->core_runtime_usec,
|
||||||
&hours, &minutes, &seconds);
|
&hours, &minutes, &seconds);
|
||||||
|
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(log, sizeof(log),
|
snprintf(log, sizeof(log),
|
||||||
"[Core]: Content ran for a total of:"
|
"[Core]: Content ran for a total of:"
|
||||||
" %02u hours, %02u minutes, %02u seconds.",
|
" %02u hours, %02u minutes, %02u seconds.",
|
||||||
|
@ -4976,6 +4977,7 @@ void core_options_reset(void)
|
||||||
|
|
||||||
void core_options_flush(void)
|
void core_options_flush(void)
|
||||||
{
|
{
|
||||||
|
size_t _len;
|
||||||
runloop_state_t *runloop_st = &runloop_state;
|
runloop_state_t *runloop_st = &runloop_state;
|
||||||
core_option_manager_t *coreopts = runloop_st->core_options;
|
core_option_manager_t *coreopts = runloop_st->core_options;
|
||||||
const char *path_core_options = path_get(RARCH_PATH_CORE_OPTIONS);
|
const char *path_core_options = path_get(RARCH_PATH_CORE_OPTIONS);
|
||||||
|
@ -5048,26 +5050,25 @@ void core_options_flush(void)
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
/* Log result */
|
/* Log result */
|
||||||
|
_len = strlcpy(msg, msg_hash_to_str(MSG_CORE_OPTIONS_FLUSHED),
|
||||||
|
sizeof(msg));
|
||||||
RARCH_LOG(
|
RARCH_LOG(
|
||||||
"[Core]: Saved core options to \"%s\".\n",
|
"[Core]: Saved core options to \"%s\".\n",
|
||||||
path_core_options ? path_core_options : "UNKNOWN");
|
path_core_options ? path_core_options : "UNKNOWN");
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%s \"%s\"",
|
|
||||||
msg_hash_to_str(MSG_CORE_OPTIONS_FLUSHED),
|
|
||||||
core_options_file);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Log result */
|
/* Log result */
|
||||||
|
_len = strlcpy(msg, msg_hash_to_str(MSG_CORE_OPTIONS_FLUSH_FAILED),
|
||||||
|
sizeof(msg));
|
||||||
RARCH_LOG(
|
RARCH_LOG(
|
||||||
"[Core]: Failed to save core options to \"%s\".\n",
|
"[Core]: Failed to save core options to \"%s\".\n",
|
||||||
path_core_options ? path_core_options : "UNKNOWN");
|
path_core_options ? path_core_options : "UNKNOWN");
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%s \"%s\"",
|
|
||||||
msg_hash_to_str(MSG_CORE_OPTIONS_FLUSH_FAILED),
|
|
||||||
core_options_file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
snprintf(msg + _len, sizeof(msg) - _len, " \"%s\"",
|
||||||
|
core_options_file);
|
||||||
|
|
||||||
runloop_msg_queue_push(
|
runloop_msg_queue_push(
|
||||||
msg, 1, 100, true,
|
msg, 1, 100, true,
|
||||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
|
@ -6403,11 +6404,8 @@ static enum runloop_state_enum runloop_check_state(
|
||||||
cur_state_slot);
|
cur_state_slot);
|
||||||
_len = strlcpy(msg, msg_hash_to_str(MSG_STATE_SLOT), sizeof(msg));
|
_len = strlcpy(msg, msg_hash_to_str(MSG_STATE_SLOT), sizeof(msg));
|
||||||
|
|
||||||
snprintf(msg + _len,
|
snprintf(msg + _len, sizeof(msg) - _len,
|
||||||
sizeof(msg) - _len,
|
": %d", settings->ints.state_slot);
|
||||||
": %d",
|
|
||||||
settings->ints.state_slot);
|
|
||||||
|
|
||||||
if (cur_state_slot < 0)
|
if (cur_state_slot < 0)
|
||||||
strlcat(msg, " (Auto)", sizeof(msg));
|
strlcat(msg, " (Auto)", sizeof(msg));
|
||||||
|
|
||||||
|
@ -6466,11 +6464,8 @@ static enum runloop_state_enum runloop_check_state(
|
||||||
cur_replay_slot);
|
cur_replay_slot);
|
||||||
_len = strlcpy(msg, msg_hash_to_str(MSG_REPLAY_SLOT), sizeof(msg));
|
_len = strlcpy(msg, msg_hash_to_str(MSG_REPLAY_SLOT), sizeof(msg));
|
||||||
|
|
||||||
snprintf(msg + _len,
|
snprintf(msg + _len, sizeof(msg) - _len,
|
||||||
sizeof(msg) - _len,
|
": %d", settings->ints.replay_slot);
|
||||||
": %d",
|
|
||||||
settings->ints.replay_slot);
|
|
||||||
|
|
||||||
if (cur_replay_slot < 0)
|
if (cur_replay_slot < 0)
|
||||||
strlcat(msg, " (Auto)", sizeof(msg));
|
strlcat(msg, " (Auto)", sizeof(msg));
|
||||||
|
|
||||||
|
@ -7228,12 +7223,14 @@ bool runloop_get_savestate_path(char *path, size_t len, int state_slot)
|
||||||
if (string_is_empty(name_savestate))
|
if (string_is_empty(name_savestate))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (state_slot > 0)
|
if (state_slot < 0)
|
||||||
snprintf(path, len, "%s%d", name_savestate, state_slot);
|
|
||||||
else if (state_slot < 0)
|
|
||||||
fill_pathname_join_delim(path, name_savestate, "auto", '.', len);
|
fill_pathname_join_delim(path, name_savestate, "auto", '.', len);
|
||||||
else
|
else
|
||||||
strlcpy(path, name_savestate, len);
|
{
|
||||||
|
size_t _len = strlcpy(path, name_savestate, len);
|
||||||
|
if (state_slot > 0)
|
||||||
|
snprintf(path + _len, len - _len, "%d", state_slot);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -7248,6 +7245,7 @@ bool runloop_get_current_replay_path(char *path, size_t len)
|
||||||
|
|
||||||
bool runloop_get_replay_path(char *path, size_t len, unsigned slot)
|
bool runloop_get_replay_path(char *path, size_t len, unsigned slot)
|
||||||
{
|
{
|
||||||
|
size_t _len;
|
||||||
runloop_state_t *runloop_st = &runloop_state;
|
runloop_state_t *runloop_st = &runloop_state;
|
||||||
const char *name_replay = NULL;
|
const char *name_replay = NULL;
|
||||||
|
|
||||||
|
@ -7258,10 +7256,9 @@ bool runloop_get_replay_path(char *path, size_t len, unsigned slot)
|
||||||
if (string_is_empty(name_replay))
|
if (string_is_empty(name_replay))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
_len = strlcpy(path, name_replay, len);
|
||||||
if (slot >= 0)
|
if (slot >= 0)
|
||||||
snprintf(path, len, "%s%d", name_replay, slot);
|
snprintf(path + _len, len - _len, "%d", slot);
|
||||||
else
|
|
||||||
strlcpy(path, name_replay, len);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
168
runtime_file.c
168
runtime_file.c
|
@ -731,12 +731,13 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
enum playlist_sublabel_last_played_style_type timedate_style,
|
enum playlist_sublabel_last_played_style_type timedate_style,
|
||||||
enum playlist_sublabel_last_played_date_separator_type date_separator)
|
enum playlist_sublabel_last_played_date_separator_type date_separator)
|
||||||
{
|
{
|
||||||
size_t _len;
|
|
||||||
char tmp[64];
|
char tmp[64];
|
||||||
bool has_am_pm = false;
|
bool has_am_pm = false;
|
||||||
const char *format_str = "";
|
const char *format_str = "";
|
||||||
|
size_t _len = strlcpy(str, msg_hash_to_str(
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED), len);
|
||||||
|
|
||||||
tmp[0] = '\0';
|
tmp[0] = '\0';
|
||||||
|
|
||||||
if (runtime_log)
|
if (runtime_log)
|
||||||
{
|
{
|
||||||
|
@ -869,21 +870,15 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
has_am_pm = false;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_am_pm)
|
if (has_am_pm)
|
||||||
{
|
{
|
||||||
if (runtime_log)
|
/* Get time */
|
||||||
{
|
struct tm time_info;
|
||||||
/* Get time */
|
runtime_log_get_last_played_time(runtime_log, &time_info);
|
||||||
struct tm time_info;
|
runtime_last_played_strftime(tmp, sizeof(tmp), format_str, &time_info);
|
||||||
runtime_log_get_last_played_time(runtime_log, &time_info);
|
|
||||||
runtime_last_played_strftime(tmp, sizeof(tmp), format_str, &time_info);
|
|
||||||
}
|
|
||||||
_len = strlcpy(str, msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED), len);
|
|
||||||
str[_len ] = ' ';
|
str[_len ] = ' ';
|
||||||
str[_len+1] = '\0';
|
str[_len+1] = '\0';
|
||||||
strlcat(str, tmp, len);
|
strlcat(str, tmp, len);
|
||||||
|
@ -897,18 +892,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %04u/%02u/%02u %02u:%02u";
|
format_str = " %04u/%02u/%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %04u.%02u.%02u %02u:%02u";
|
format_str = " %04u.%02u.%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %04u-%02u-%02u %02u:%02u";
|
format_str = " %04u-%02u-%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.year,
|
runtime_log->last_played.year,
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
|
@ -919,18 +912,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %04u/%02u/%02u";
|
format_str = " %04u/%02u/%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %04u.%02u.%02u";
|
format_str = " %04u.%02u.%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %04u-%02u-%02u";
|
format_str = " %04u-%02u-%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.year,
|
runtime_log->last_played.year,
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.day);
|
runtime_log->last_played.day);
|
||||||
|
@ -939,18 +930,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %04u/%02u";
|
format_str = " %04u/%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %04u.%02u";
|
format_str = " %04u.%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %04u-%02u";
|
format_str = " %04u-%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.year,
|
runtime_log->last_played.year,
|
||||||
runtime_log->last_played.month);
|
runtime_log->last_played.month);
|
||||||
return;
|
return;
|
||||||
|
@ -958,18 +947,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u/%04u %02u:%02u:%02u";
|
format_str = " %02u/%02u/%04u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u.%04u %02u:%02u:%02u";
|
format_str = " %02u.%02u.%04u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u-%04u %02u:%02u:%02u";
|
format_str = " %02u-%02u-%04u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
runtime_log->last_played.year,
|
runtime_log->last_played.year,
|
||||||
|
@ -981,18 +968,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u/%04u %02u:%02u";
|
format_str = " %02u/%02u/%04u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u.%04u %02u:%02u";
|
format_str = " %02u.%02u.%04u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u-%04u %02u:%02u";
|
format_str = " %02u-%02u-%04u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
runtime_log->last_played.year,
|
runtime_log->last_played.year,
|
||||||
|
@ -1003,18 +988,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u %02u:%02u";
|
format_str = " %02u/%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u %02u:%02u";
|
format_str = " %02u.%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u %02u:%02u";
|
format_str = " %02u-%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
runtime_log->last_played.hour,
|
runtime_log->last_played.hour,
|
||||||
|
@ -1024,18 +1007,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u/%04u";
|
format_str = " %02u/%02u/%04u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u.%04u";
|
format_str = " %02u.%02u.%04u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u-%04u";
|
format_str = " %02u-%02u-%04u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
runtime_log->last_played.year);
|
runtime_log->last_played.year);
|
||||||
|
@ -1044,18 +1025,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u";
|
format_str = " %02u/%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u";
|
format_str = " %02u.%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u";
|
format_str = " %02u-%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.day);
|
runtime_log->last_played.day);
|
||||||
return;
|
return;
|
||||||
|
@ -1063,18 +1042,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u/%04u %02u:%02u:%02u";
|
format_str = " %02u/%02u/%04u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u.%04u %02u:%02u:%02u";
|
format_str = " %02u.%02u.%04u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u-%04u %02u:%02u:%02u";
|
format_str = " %02u-%02u-%04u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.year,
|
runtime_log->last_played.year,
|
||||||
|
@ -1086,18 +1063,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u/%04u %02u:%02u";
|
format_str = " %02u/%02u/%04u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u.%04u %02u:%02u";
|
format_str = " %02u.%02u.%04u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u-%04u %02u:%02u";
|
format_str = " %02u-%02u-%04u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.year,
|
runtime_log->last_played.year,
|
||||||
|
@ -1108,18 +1083,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u %02u:%02u";
|
format_str = " %02u/%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u %02u:%02u";
|
format_str = " %02u.%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u %02u:%02u";
|
format_str = " %02u-%02u %02u:%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.hour,
|
runtime_log->last_played.hour,
|
||||||
|
@ -1129,18 +1102,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u/%04u";
|
format_str = " %02u/%02u/%04u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u.%04u";
|
format_str = " %02u.%02u.%04u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u-%04u";
|
format_str = " %02u-%02u-%04u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.year);
|
runtime_log->last_played.year);
|
||||||
|
@ -1149,18 +1120,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %02u/%02u";
|
format_str = " %02u/%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %02u.%02u";
|
format_str = " %02u.%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %02u-%02u";
|
format_str = " %02u-%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.day, runtime_log->last_played.month);
|
runtime_log->last_played.day, runtime_log->last_played.month);
|
||||||
return;
|
return;
|
||||||
case PLAYLIST_LAST_PLAYED_STYLE_AGO:
|
case PLAYLIST_LAST_PLAYED_STYLE_AGO:
|
||||||
|
@ -1169,8 +1138,6 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
msg_hash_to_str(
|
msg_hash_to_str(
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER),
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER),
|
||||||
sizeof(tmp));
|
sizeof(tmp));
|
||||||
_len = strlcpy(str, msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED), len);
|
|
||||||
str[_len ] = ' ';
|
str[_len ] = ' ';
|
||||||
str[_len+1] = '\0';
|
str[_len+1] = '\0';
|
||||||
strlcat(str, tmp, len);
|
strlcat(str, tmp, len);
|
||||||
|
@ -1180,18 +1147,16 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
switch (date_separator)
|
switch (date_separator)
|
||||||
{
|
{
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_SLASH:
|
||||||
format_str = "%s %04u/%02u/%02u %02u:%02u:%02u";
|
format_str = " %04u/%02u/%02u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
case PLAYLIST_LAST_PLAYED_DATE_SEPARATOR_PERIOD:
|
||||||
format_str = "%s %04u.%02u.%02u %02u:%02u:%02u";
|
format_str = " %04u.%02u.%02u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format_str = "%s %04u-%02u-%02u %02u:%02u:%02u";
|
format_str = " %04u-%02u-%02u %02u:%02u:%02u";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
snprintf(str, len, format_str,
|
snprintf(str + _len, len - _len, format_str,
|
||||||
msg_hash_to_str(
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
runtime_log->last_played.year,
|
runtime_log->last_played.year,
|
||||||
runtime_log->last_played.month,
|
runtime_log->last_played.month,
|
||||||
runtime_log->last_played.day,
|
runtime_log->last_played.day,
|
||||||
|
@ -1202,11 +1167,8 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
snprintf(str, len,
|
snprintf(str + _len, len - _len,
|
||||||
"%s %s",
|
" %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER));
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED),
|
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Status */
|
/* Status */
|
||||||
|
|
|
@ -247,9 +247,10 @@ error:
|
||||||
|
|
||||||
static bool bsv_movie_start_record(input_driver_state_t * input_st, char *path)
|
static bool bsv_movie_start_record(input_driver_state_t * input_st, char *path)
|
||||||
{
|
{
|
||||||
|
size_t _len;
|
||||||
char msg[8192];
|
char msg[8192];
|
||||||
bsv_movie_t *state = NULL;
|
bsv_movie_t *state = NULL;
|
||||||
const char *movie_rec_str = msg_hash_to_str(MSG_STARTING_MOVIE_RECORD_TO);
|
const char *movie_rec_str = NULL;
|
||||||
|
|
||||||
/* this should trigger a start recording task which on failure or
|
/* this should trigger a start recording task which on failure or
|
||||||
success prints a message and on success sets the
|
success prints a message and on success sets the
|
||||||
|
@ -267,10 +268,9 @@ static bool bsv_movie_start_record(input_driver_state_t * input_st, char *path)
|
||||||
|
|
||||||
input_st->bsv_movie_state_handle = state;
|
input_st->bsv_movie_state_handle = state;
|
||||||
input_st->bsv_movie_state.flags |= BSV_FLAG_MOVIE_RECORDING;
|
input_st->bsv_movie_state.flags |= BSV_FLAG_MOVIE_RECORDING;
|
||||||
snprintf(msg, sizeof(msg),
|
movie_rec_str = msg_hash_to_str(MSG_STARTING_MOVIE_RECORD_TO);
|
||||||
"%s \"%s\".", movie_rec_str,
|
_len = strlcpy(msg, movie_rec_str, sizeof(msg));
|
||||||
path);
|
snprintf(msg + _len, sizeof(msg) - _len, " \"%s\".", path);
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 2, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
runloop_msg_queue_push(msg, 2, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
RARCH_LOG("%s \"%s\".\n", movie_rec_str, path);
|
RARCH_LOG("%s \"%s\".\n", movie_rec_str, path);
|
||||||
|
|
||||||
|
@ -418,10 +418,12 @@ bool movie_stop(input_driver_state_t *input_st)
|
||||||
bool movie_start_playback(input_driver_state_t *input_st, char *path)
|
bool movie_start_playback(input_driver_state_t *input_st, char *path)
|
||||||
{
|
{
|
||||||
retro_task_t *task = task_init();
|
retro_task_t *task = task_init();
|
||||||
moviectl_task_state_t *state = (moviectl_task_state_t *) calloc(1, sizeof(*state));
|
moviectl_task_state_t *state = (moviectl_task_state_t *)calloc(1, sizeof(*state));
|
||||||
bool file_exists = filestream_exists(path);
|
bool file_exists = filestream_exists(path);
|
||||||
|
|
||||||
if (!task || !state || !file_exists)
|
if (!task || !state || !file_exists)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
*state = input_st->bsv_movie_state;
|
*state = input_st->bsv_movie_state;
|
||||||
strlcpy(state->movie_start_path, path, sizeof(state->movie_start_path));
|
strlcpy(state->movie_start_path, path, sizeof(state->movie_start_path));
|
||||||
task->type = TASK_TYPE_NONE;
|
task->type = TASK_TYPE_NONE;
|
||||||
|
@ -441,20 +443,23 @@ error:
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool movie_start_record(input_driver_state_t *input_st, char*path)
|
bool movie_start_record(input_driver_state_t *input_st, char*path)
|
||||||
{
|
{
|
||||||
|
size_t _len;
|
||||||
char msg[8192];
|
char msg[8192];
|
||||||
const char *movie_rec_str = msg_hash_to_str(MSG_STARTING_MOVIE_RECORD_TO);
|
const char *movie_rec_str = msg_hash_to_str(MSG_STARTING_MOVIE_RECORD_TO);
|
||||||
retro_task_t *task = task_init();
|
retro_task_t *task = task_init();
|
||||||
moviectl_task_state_t *state = (moviectl_task_state_t *) calloc(1, sizeof(*state));
|
moviectl_task_state_t *state = (moviectl_task_state_t *)calloc(1, sizeof(*state));
|
||||||
|
|
||||||
if (!task || !state)
|
if (!task || !state)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
*state = input_st->bsv_movie_state;
|
*state = input_st->bsv_movie_state;
|
||||||
strlcpy(state->movie_start_path, path, sizeof(state->movie_start_path));
|
strlcpy(state->movie_start_path, path, sizeof(state->movie_start_path));
|
||||||
|
|
||||||
msg[0] = '\0';
|
_len = strlcpy(msg, movie_rec_str, sizeof(msg));
|
||||||
snprintf(msg, sizeof(msg), "%s \"%s\".", movie_rec_str, path);
|
snprintf(msg + _len, sizeof(msg) - _len, " \"%s\".", path);
|
||||||
|
|
||||||
task->type = TASK_TYPE_NONE;
|
task->type = TASK_TYPE_NONE;
|
||||||
task->state = state;
|
task->state = state;
|
||||||
|
@ -476,5 +481,4 @@ error:
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue