(Wii) Use rarch_settings_msg for platform-agnostic string representation
in RetroArch console ports
This commit is contained in:
parent
41868ac1da
commit
f6b1d8cfca
|
@ -183,9 +183,11 @@ void rarch_settings_default(unsigned setting)
|
|||
|
||||
void rarch_settings_msg(unsigned setting, unsigned delay)
|
||||
{
|
||||
char str[PATH_MAX];
|
||||
char str[PATH_MAX], tmp[PATH_MAX];
|
||||
msg_queue_clear(g_extern.msg_queue);
|
||||
|
||||
(void)tmp;
|
||||
|
||||
switch(setting)
|
||||
{
|
||||
case S_MSG_CACHE_PARTITION:
|
||||
|
@ -197,6 +199,10 @@ void rarch_settings_msg(unsigned setting, unsigned delay)
|
|||
case S_MSG_EXTRACTED_ZIPFILE:
|
||||
snprintf(str, sizeof(str), "INFO - ZIP file successfully extracted to cache partition.");
|
||||
break;
|
||||
case S_MSG_LOADING_ROM:
|
||||
fill_pathname_base(tmp, g_console.rom_path, sizeof(tmp));
|
||||
snprintf(str, sizeof(str), "INFO - Loading %.38s...", tmp);
|
||||
break;
|
||||
case S_MSG_NOT_IMPLEMENTED:
|
||||
snprintf(str, sizeof(str), "TODO - Not yet implemented.");
|
||||
break;
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
enum
|
||||
{
|
||||
S_DELAY_0 = 0,
|
||||
S_DELAY_90 = 90,
|
||||
S_DELAY_180 = 180,
|
||||
S_DELAY_270 = 270
|
||||
};
|
||||
|
@ -71,6 +73,7 @@ enum
|
|||
S_MSG_CACHE_PARTITION = 0,
|
||||
S_MSG_CHANGE_CONTROLS,
|
||||
S_MSG_EXTRACTED_ZIPFILE,
|
||||
S_MSG_LOADING_ROM,
|
||||
S_MSG_NOT_IMPLEMENTED,
|
||||
S_MSG_RESIZE_SCREEN,
|
||||
S_MSG_RESTART_RARCH,
|
||||
|
|
|
@ -281,8 +281,11 @@ const char *rgui_iterate(rgui_handle_t *rgui, rgui_action_t action)
|
|||
{
|
||||
snprintf(rgui->path_buf, sizeof(rgui->path_buf), "%s/%s",
|
||||
strcmp(dir, "/") == 0 ? "" : dir, path);
|
||||
char message[50];
|
||||
snprintf(message, sizeof(message) / sizeof(message[0]), "Loading %.38s...", path);
|
||||
strlcpy(g_console.rom_path, rgui->path_buf, sizeof(g_console.rom_path));
|
||||
rarch_settings_msg(S_MSG_LOADING_ROM, S_DELAY_0);
|
||||
|
||||
const char * message = msg_queue_pull(g_extern.msg_queue);
|
||||
|
||||
render_messagebox(rgui, message);
|
||||
return rgui->path_buf;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue