Merge pull request #6532 from Dwedit/master

Runahead: Move Callback Init calls to after load content (fixes Mesen crashing)
This commit is contained in:
Twinaphex 2018-04-05 23:25:55 +02:00 committed by GitHub
commit 3e699cf00b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,13 +202,6 @@ bool secondary_core_create(void)
if (init_libretro_sym_custom(CORE_TYPE_PLAIN, &secondary_core, secondary_library_path, &secondary_module))
{
secondary_core.symbols_inited = true;
core_set_default_callbacks(&secondary_callbacks);
secondary_core.retro_set_video_refresh(secondary_callbacks.frame_cb);
secondary_core.retro_set_audio_sample(secondary_callbacks.sample_cb);
secondary_core.retro_set_audio_sample_batch(secondary_callbacks.sample_batch_cb);
secondary_core.retro_set_input_state(secondary_callbacks.state_cb);
secondary_core.retro_set_input_poll(secondary_callbacks.poll_cb);
secondary_core.retro_set_environment(rarch_environment_secondary_core_hook);
secondary_core_set_variable_update();
@ -260,6 +253,13 @@ bool secondary_core_create(void)
return false;
}
core_set_default_callbacks(&secondary_callbacks);
secondary_core.retro_set_video_refresh(secondary_callbacks.frame_cb);
secondary_core.retro_set_audio_sample(secondary_callbacks.sample_cb);
secondary_core.retro_set_audio_sample_batch(secondary_callbacks.sample_batch_cb);
secondary_core.retro_set_input_state(secondary_callbacks.state_cb);
secondary_core.retro_set_input_poll(secondary_callbacks.poll_cb);
for (port = 0; port < 16; port++)
{
device = port_map[port];