Unverified Commit f445ce41 authored by Libretro-Admin's avatar Libretro-Admin Committed by GitHub
Browse files

Merge pull request #151 from cout/fix_memory_descriptor_initialization

Assign map descriptors after ROM is loaded
parents 6ccb580c f2f2fb8d
Pipeline #51938 passed with stages
in 27 minutes and 36 seconds
......@@ -1420,9 +1420,6 @@ bool retro_load_game(const struct retro_game_info *game)
init_descriptors();
memorydesc_c = 0;
map.descriptors = memorydesc + MAX_MAPS - memorydesc_c;
map.num_descriptors = memorydesc_c;
/* Hack. S9x cannot do stuff from RAM. <_< */
memstream_set_buffer((uint8_t*)game->data, (uint64_t)game->size);
......@@ -1444,6 +1441,10 @@ bool retro_load_game(const struct retro_game_info *game)
retro_set_audio_buff_status_cb();
set_system_specs();
map.descriptors = memorydesc + MAX_MAPS - memorydesc_c;
map.num_descriptors = memorydesc_c;
environ_cb(RETRO_ENVIRONMENT_SET_MEMORY_MAPS, &map);
return TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment