skip loading a core when it is already active when starting a netplay
game.
This commit is contained in:
parent
39adab8cc1
commit
bf7d19f401
|
@ -35,6 +35,7 @@
|
||||||
#include "../command.h"
|
#include "../command.h"
|
||||||
#include "../core_info.h"
|
#include "../core_info.h"
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
|
#include "../../menu/menu_driver.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -55,12 +56,15 @@ static void netplay_crc_scan_callback(void *task_data,
|
||||||
{
|
{
|
||||||
netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data;
|
netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data;
|
||||||
content_ctx_info_t content_info = {0};
|
content_ctx_info_t content_info = {0};
|
||||||
|
rarch_system_info_t *info = NULL;
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
|
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET, &info);
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
/* regular core with content file */
|
/* regular core with content file */
|
||||||
if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path)
|
if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path)
|
||||||
|
@ -70,11 +74,15 @@ static void netplay_crc_scan_callback(void *task_data,
|
||||||
state->core_path, state->content_path);
|
state->core_path, state->content_path);
|
||||||
|
|
||||||
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname);
|
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,
|
if (string_is_equal(info->info.library_name, state->core_name))
|
||||||
&content_info,
|
task_push_load_content_with_core_from_menu(
|
||||||
CORE_TYPE_PLAIN,
|
state->content_path, &content_info,
|
||||||
NULL, NULL);
|
CORE_TYPE_PLAIN, NULL, NULL);
|
||||||
|
else
|
||||||
|
task_push_load_content_with_new_core_from_menu(
|
||||||
|
state->core_path, state->content_path,
|
||||||
|
&content_info, CORE_TYPE_PLAIN, NULL, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
@ -87,8 +95,11 @@ static void netplay_crc_scan_callback(void *task_data,
|
||||||
content_ctx_info_t content_info = {0};
|
content_ctx_info_t content_info = {0};
|
||||||
|
|
||||||
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname);
|
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname);
|
||||||
task_push_load_new_core(state->core_path, NULL,
|
|
||||||
&content_info, CORE_TYPE_PLAIN, NULL, NULL);
|
if (!string_is_equal(info->info.library_name, state->core_name))
|
||||||
|
task_push_load_new_core(state->core_path, NULL,
|
||||||
|
&content_info, CORE_TYPE_PLAIN, NULL, NULL);
|
||||||
|
|
||||||
task_push_start_current_core(&content_info);
|
task_push_start_current_core(&content_info);
|
||||||
}
|
}
|
||||||
/* regular core with current content */
|
/* regular core with current content */
|
||||||
|
|
Loading…
Reference in New Issue