add support for no content cores

This commit is contained in:
radius 2017-01-28 22:12:34 -05:00
parent 1d4be4cb1b
commit cfb882f4fc
2 changed files with 25 additions and 2 deletions

View File

@ -441,7 +441,7 @@ static void netplay_announce()
"gamename=%s&gamecrc=%d&port=%d",
url, settings->username, system->info.library_name,
system->info.library_version,
path_basename(path_get(RARCH_PATH_BASENAME)),*content_crc_ptr,
!string_is_empty(path_basename(path_get(RARCH_PATH_BASENAME))) ? path_basename(path_get(RARCH_PATH_BASENAME)) : "N/A",*content_crc_ptr,
settings->netplay.port);
task_push_http_transfer(buf, true, NULL, netplay_announce_cb, NULL);

View File

@ -56,6 +56,7 @@ static void netplay_crc_scan_callback(void *task_data,
if (!state)
return;
fflush(stdout);
if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path))
{
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname);
@ -66,6 +67,16 @@ static void netplay_crc_scan_callback(void *task_data,
CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU,
NULL, NULL);
}
else if(string_is_equal(state->content_path, "N/A"))
{
printf("Content: %s Core: %s\n", state->content_path, state->core_path);
task_push_content_load_default(
state->core_path, NULL,
NULL,
CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_NOTHING_WITH_NEW_CORE_FROM_MENU,
NULL, NULL);
}
else
{
/* TO-DO: Inform the user no compatible core or content was found */
@ -100,7 +111,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
if (state->lpl_list->size == 0)
goto no_playlists;
/* content with no CRC uses 00000000*/
if (!string_is_equal(state->content_crc, "00000000|crc"))
{
@ -139,6 +150,15 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
free(playlist);
}
}
else if(string_is_equal(state->content_path, "N/A"))
{
state->found = true;
task_set_data(task, state);
task_set_progress(task, 100);
task_set_title(task, strdup("Compatible content found"));
task_set_finished(task, true);
return;
}
else
{
RARCH_LOG("Using filename matching\n");
@ -231,6 +251,9 @@ bool task_push_netplay_crc_scan(uint32_t crc, char* name,
/* check if the core name matches.
TO-DO :we could try to load the core too to check
if the version string matches too */
#if 0
printf("Info: %s State: %s", info->list[i].core_name, state->core_name);
#endif
if(string_is_equal(info->list[i].core_name, state->core_name))
{
strlcpy(state->core_path, info->list[i].path, sizeof(state->core_path));