Add more strings

This commit is contained in:
twinaphex 2016-06-27 08:19:39 +02:00
parent f5bfbdeebe
commit 728249fa61
5 changed files with 23 additions and 6 deletions

View File

@ -846,7 +846,9 @@ static void command_event_disk_control_set_eject(bool new_state, bool print_log)
if (control->set_eject_state(new_state))
snprintf(msg, sizeof(msg), "%s %s",
new_state ? "Ejected" : "Closed",
new_state ?
msg_hash_to_str(MSG_DISK_EJECTED) :
msg_hash_to_str(MSG_DISK_CLOSED),
msg_hash_to_str(MSG_VIRTUAL_DISK_TRAY));
else
{
@ -969,7 +971,7 @@ static bool command_event_disk_control_append_image(const char *path)
command_event(CMD_EVENT_AUTOSAVE_DEINIT, NULL);
/* TODO: Need to figure out what to do with subsystems case. */
if (!*global->subsystem)
if (string_is_empty(global->subsystem))
{
/* Update paths for our new image.
* If we actually use append_image, we assume that we
@ -1460,9 +1462,13 @@ static bool command_event_save_core_config(void)
fill_pathname_join(config_path, config_dir, config_name,
sizeof(config_path));
if (i)
snprintf(tmp, sizeof(tmp), "-%u.cfg", i);
snprintf(tmp, sizeof(tmp), "-%u%s",
i,
file_path_str(FILE_PATH_CONFIG_EXTENSION));
else
strlcpy(tmp, ".cfg", sizeof(tmp));
strlcpy(tmp,
file_path_str(FILE_PATH_CONFIG_EXTENSION),
sizeof(tmp));
strlcat(config_path, tmp, sizeof(config_path));
if (!path_file_exists(config_path))
@ -1477,7 +1483,9 @@ static bool command_event_save_core_config(void)
if (!found_path)
{
RARCH_WARN("Cannot infer new config path. Use current time.\n");
fill_dated_filename(config_name, "cfg", sizeof(config_name));
fill_dated_filename(config_name,
file_path_str(FILE_PATH_CONFIG_EXTENSION),
sizeof(config_name));
fill_pathname_join(config_path, config_dir, config_name,
sizeof(config_path));
}
@ -1774,7 +1782,7 @@ bool command_event(enum event_command cmd, void *data)
core_info_ctx_find_t info_find;
#if defined(HAVE_DYNAMIC)
if (!(*settings->path.libretro))
if (string_is_empty(settings->path.libretro))
return false;
libretro_get_system_info(

View File

@ -49,6 +49,7 @@ enum file_path_enum
FILE_PATH_RTC_EXTENSION,
FILE_PATH_CHT_EXTENSION,
FILE_PATH_LPL_EXTENSION,
FILE_PATH_CONFIG_EXTENSION,
FILE_PATH_CORE_INFO_EXTENSION
};

View File

@ -27,6 +27,8 @@ const char *file_path_str(enum file_path_enum enum_idx)
#endif
case FILE_PATH_CORE_INFO_EXTENSION:
return ".info";
case FILE_PATH_CONFIG_EXTENSION:
return ".cfg";
case FILE_PATH_RTC_EXTENSION:
return ".rtc";
case FILE_PATH_CHT_EXTENSION:

View File

@ -1995,6 +1995,10 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
return "Frontend for libretro";
case MSG_LOADING:
return "Loading";
case MSG_DISK_EJECTED:
return "Ejected";
case MSG_DISK_CLOSED:
return "Closed";
case MSG_VERSION_OF_LIBRETRO_API:
return "Version of libretro API";
case MSG_COMPILED_AGAINST_API:

View File

@ -141,6 +141,8 @@ enum msg_hash_enums
MSG_REVERTING_SAVEFILE_DIRECTORY_TO,
MSG_ERROR_PARSING_ARGUMENTS,
MSG_REVERTING_SAVESTATE_DIRECTORY_TO,
MSG_DISK_EJECTED,
MSG_DISK_CLOSED,
MSG_REWIND_INIT,
MSG_REWIND_INIT_FAILED,
MSG_REWIND_INIT_FAILED_THREADED_AUDIO,