mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
Merge pull request #4523 from fr500/master
add support for no content cores
This commit is contained in:
commit
2596de53ec
@ -3148,7 +3148,7 @@ static int action_ok_netplay_connect_room(const char *path,
|
||||
|
||||
task_push_netplay_crc_scan(netplay_room_list[idx - 2].gamecrc,
|
||||
netplay_room_list[idx - 2].gamename,
|
||||
tmp_hostname, netplay_room_list[idx - 1].corename);
|
||||
tmp_hostname, netplay_room_list[idx - 2].corename);
|
||||
|
||||
#else
|
||||
return -1;
|
||||
|
@ -158,7 +158,7 @@ static int action_bind_sublabel_netplay_room(
|
||||
netplay_room_list[i - 2].corename, netplay_room_list[i - 2].coreversion,
|
||||
netplay_room_list[i - 2].gamename, netplay_room_list[i - 2].gamecrc);
|
||||
#if 0
|
||||
strlcpy(s, netplay_room_list[i - 1].corename, len);
|
||||
strlcpy(s, netplay_room_list[i - 2].corename, len);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -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);
|
||||
|
8
paths.c
8
paths.c
@ -177,7 +177,9 @@ void path_set_redirect(void)
|
||||
|
||||
if (path_is_directory(global->name.savefile))
|
||||
{
|
||||
fill_pathname_dir(global->name.savefile, path_main_basename,
|
||||
fill_pathname_dir(global->name.savefile,
|
||||
!string_is_empty(path_main_basename) ? path_main_basename :
|
||||
info->info.library_name,
|
||||
file_path_str(FILE_PATH_SRM_EXTENSION),
|
||||
sizeof(global->name.savefile));
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
@ -187,7 +189,9 @@ void path_set_redirect(void)
|
||||
|
||||
if (path_is_directory(global->name.savestate))
|
||||
{
|
||||
fill_pathname_dir(global->name.savestate, path_main_basename,
|
||||
fill_pathname_dir(global->name.savestate,
|
||||
!string_is_empty(path_main_basename) ? path_main_basename :
|
||||
info->info.library_name,
|
||||
file_path_str(FILE_PATH_STATE_EXTENSION),
|
||||
sizeof(global->name.savestate));
|
||||
RARCH_LOG("%s \"%s\".\n",
|
||||
|
@ -1268,8 +1268,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
bool is_inited = false;
|
||||
content_get_status(&contentless, &is_inited);
|
||||
|
||||
if (contentless)
|
||||
return false;
|
||||
path_set_redirect();
|
||||
}
|
||||
break;
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user