Create CORE_CTL_RETRO_GET_SYSTEM_INFO

This commit is contained in:
twinaphex 2016-01-27 08:58:31 +01:00
parent a9e71b12e1
commit fef5ecd97b
4 changed files with 15 additions and 3 deletions

View File

@ -28,6 +28,7 @@
#include "configuration.h"
#include "performance.h"
#include "runloop.h"
#include "libretro_version_1.h"
#ifdef HAVE_MENU
#include "menu/menu_driver.h"
@ -1858,7 +1859,7 @@ int cheevos_load(const void *data)
/* The the supported extensions as a hint to what method we should use. */
core.retro_get_system_info(&sysinfo);
core_ctl(CORE_CTL_RETRO_GET_SYSTEM_INFO, &sysinfo);
for (i = 0; i < sizeof(finders) / sizeof(finders[0]); i++)
{

View File

@ -29,6 +29,7 @@
#include "general.h"
#include "msg_hash.h"
#include "rewind.h"
#include "system.h"
#include "gfx/video_driver.h"
#include "audio/audio_driver.h"
@ -173,6 +174,14 @@ bool core_ctl(enum core_ctl_state state, void *data)
switch (state)
{
case CORE_CTL_RETRO_GET_SYSTEM_INFO:
{
struct retro_system_info *system = (struct retro_system_info*)data;
if (!system)
return false;
core.retro_get_system_info(system);
}
break;
case CORE_CTL_RETRO_UNSERIALIZE:
{
retro_ctx_serialize_info_t *info = (retro_ctx_serialize_info_t*)data;

View File

@ -85,7 +85,9 @@ enum core_ctl_state
/**
* Initialize system A/V information.
**/
CORE_CTL_INIT_SYSTEM_AV_INFO
CORE_CTL_INIT_SYSTEM_AV_INFO,
CORE_CTL_RETRO_GET_SYSTEM_INFO
};
typedef struct retro_ctx_serialize_info

View File

@ -468,7 +468,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
case RUNLOOP_CTL_SHADER_DIR_INIT:
return shader_dir_init(&runloop_shader_dir);
case RUNLOOP_CTL_SYSTEM_INFO_INIT:
core.retro_get_system_info(&runloop_system.info);
core_ctl(CORE_CTL_RETRO_GET_SYSTEM_INFO, &runloop_system.info);
if (!runloop_system.info.library_name)
runloop_system.info.library_name = msg_hash_to_str(MSG_UNKNOWN);