mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Allow RETRO_ENVIRONMENT_SET_MEMORY_MAPS also after core startup
Change the comment in libretro.h about the removed limit and handle the environment call during core runtime in RetroArch.
This commit is contained in:
parent
22de73da3b
commit
18f79a8a8d
@ -933,13 +933,13 @@ int cheat_manager_initialize_memory(rarch_setting_t *setting, size_t idx, bool w
|
|||||||
offset += cheat_st->memory_size_list[i];
|
offset += cheat_st->memory_size_list[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_INIT_SUCCESS), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
|
|
||||||
cheat_st->memory_search_initialized = true;
|
cheat_st->memory_search_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cheat_st->memory_initialized = true;
|
cheat_st->memory_initialized = true;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_INIT_SUCCESS), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
if (!wraparound)
|
if (!wraparound)
|
||||||
menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH
|
menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH
|
||||||
@ -1028,7 +1028,7 @@ static int cheat_manager_search(enum cheat_search_type search_type)
|
|||||||
struct menu_state *menu_st = menu_state_get_ptr();
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (cheat_st->num_memory_buffers == 0)
|
if (cheat_st->num_memory_buffers == 0 || prev == NULL || cheat_st->matches == NULL)
|
||||||
{
|
{
|
||||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_NOT_INITIALIZED), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_SEARCH_NOT_INITIALIZED), 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -744,6 +744,11 @@ void rcheevos_reset_game(bool widgets_ready)
|
|||||||
rcheevos_init_memory(&rcheevos_locals);
|
rcheevos_init_memory(&rcheevos_locals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rcheevos_refresh_memory()
|
||||||
|
{
|
||||||
|
rcheevos_init_memory(&rcheevos_locals);
|
||||||
|
}
|
||||||
|
|
||||||
bool rcheevos_hardcore_active(void)
|
bool rcheevos_hardcore_active(void)
|
||||||
{
|
{
|
||||||
return rcheevos_locals.hardcore_active;
|
return rcheevos_locals.hardcore_active;
|
||||||
|
@ -37,6 +37,7 @@ bool rcheevos_unload(void);
|
|||||||
void rcheevos_test(void);
|
void rcheevos_test(void);
|
||||||
|
|
||||||
void rcheevos_reset_game(bool widgets_ready);
|
void rcheevos_reset_game(bool widgets_ready);
|
||||||
|
void rcheevos_refresh_memory();
|
||||||
|
|
||||||
void rcheevos_pause_hardcore(void);
|
void rcheevos_pause_hardcore(void);
|
||||||
void rcheevos_hardcore_enabled_changed(void);
|
void rcheevos_hardcore_enabled_changed(void);
|
||||||
|
@ -928,8 +928,6 @@ enum retro_mod
|
|||||||
* anything else.
|
* anything else.
|
||||||
* It is recommended to expose all relevant pointers through
|
* It is recommended to expose all relevant pointers through
|
||||||
* retro_get_memory_* as well.
|
* retro_get_memory_* as well.
|
||||||
*
|
|
||||||
* Can be called from retro_init and retro_load_game.
|
|
||||||
*/
|
*/
|
||||||
#define RETRO_ENVIRONMENT_SET_GEOMETRY 37
|
#define RETRO_ENVIRONMENT_SET_GEOMETRY 37
|
||||||
/* const struct retro_game_geometry * --
|
/* const struct retro_game_geometry * --
|
||||||
|
11
runloop.c
11
runloop.c
@ -2832,6 +2832,17 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
|||||||
|
|
||||||
mmap_preprocess_descriptors(descriptors, mmaps->num_descriptors);
|
mmap_preprocess_descriptors(descriptors, mmaps->num_descriptors);
|
||||||
|
|
||||||
|
#ifdef HAVE_CHEEVOS
|
||||||
|
rcheevos_refresh_memory();
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_CHEATS
|
||||||
|
if (cheat_manager_state.memory_initialized)
|
||||||
|
{
|
||||||
|
cheat_manager_initialize_memory(NULL, 0, true);
|
||||||
|
cheat_manager_apply_retro_cheats();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (log_level != RETRO_LOG_DEBUG)
|
if (log_level != RETRO_LOG_DEBUG)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user