cleanup conditionals

This commit is contained in:
radius 2017-05-21 22:35:29 -05:00
parent d1291f406b
commit bae2110bb4

View File

@ -62,11 +62,13 @@ static void netplay_crc_scan_callback(void *task_data,
fflush(stdout);
#ifdef HAVE_MENU
if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path) &&
string_is_not_equal_fast(state->content_path, "N/A", 3))
/* regular core with content file */
if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path)
&& !state->contentless && !state->current)
{
RARCH_LOG("[lobby] loading core %s with content file %s\n",
state->core_path, state->content_path);
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname);
task_push_load_content_with_new_core_from_menu(
state->core_path, state->content_path,
@ -76,9 +78,11 @@ static void netplay_crc_scan_callback(void *task_data,
}
else
#endif
if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path) &&
string_is_equal_fast(state->content_path, "N/A", 3) && !state->current)
/* contentless core */
if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path)
&& state->contentless)
{
RARCH_LOG("[lobby] loading contentless core %s\n", state->core_path);
content_ctx_info_t content_info = {0};
@ -87,15 +91,16 @@ static void netplay_crc_scan_callback(void *task_data,
&content_info, CORE_TYPE_PLAIN, NULL, NULL);
task_push_start_current_core(&content_info);
}
else if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path) &&
string_is_equal_fast(state->content_path, "N/A", 3) && state->current)
/* regular core with current content */
else if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path)
&& state->current)
{
RARCH_LOG("[lobby] loading core %s with current content\n", state->core_path);
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT, state->hostname);
}
/* no match found */
else
{
/* TO-DO: Inform the user no compatible core or content was found */
RARCH_LOG("Couldn't find a suitable %s\n",
string_is_empty(state->content_path) ? "content file" : "core");
runloop_msg_queue_push(
@ -261,6 +266,7 @@ filename_matching:
else
{
state->found = true;
state->contentless = true;
task_set_data(task, state);
task_set_progress(task, 100);
task_free_title(task);