fixed warning + allow cli arguments on Haiku (#16887)

This commit is contained in:
kwyxz 2024-08-17 07:58:49 -07:00 committed by GitHub
parent da8c0accd6
commit fab86199a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -4463,9 +4463,9 @@ bool command_event(enum event_command cmd, void *data)
}
break;
}
#if HAVE_MENU
case CMD_EVENT_ADD_TO_PLAYLIST:
{
#ifdef HAVE_MENU
struct string_list *str_list = (struct string_list*)data;
struct menu_state *menu_st = menu_state_get_ptr();
settings_t *settings = config_get_ptr();
@ -4532,9 +4532,9 @@ bool command_event(enum event_command cmd, void *data)
NULL, menu_st->userdata);
}
}
#endif
break;
}
#endif
case CMD_EVENT_RESET_CORE_ASSOCIATION:
{
const char *core_name = "DETECT";

View File

@ -1432,10 +1432,14 @@ static bool content_load(content_ctx_info_t *info,
wrap_args->flags = 0;
wrap_args->argc = 0;
/* The following snippet breaks command-line arguments on Haiku which in turn
prevents from using RA without a menu or to start it from a front-end like ES-DE.
All things considered, the risk/reward is favorable to just skipping this. */
#ifndef __HAIKU__
if (info->environ_get)
info->environ_get(rarch_argc_ptr,
rarch_argv_ptr, info->args, wrap_args);
#endif
if (wrap_args->flags & RARCH_MAIN_WRAP_FLAG_TOUCHED)
{
content_load_init_wrap(wrap_args, &rarch_argc, rarch_argv);