mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
Create CORE_CTL_VERIFY_API_VERSION
This commit is contained in:
parent
76f068f852
commit
392fee9023
@ -27,6 +27,7 @@
|
|||||||
#include "libretro.h"
|
#include "libretro.h"
|
||||||
#include "libretro_version_1.h"
|
#include "libretro_version_1.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
#include "msg_hash.h"
|
||||||
#include "rewind.h"
|
#include "rewind.h"
|
||||||
#include "gfx/video_driver.h"
|
#include "gfx/video_driver.h"
|
||||||
#include "audio/audio_driver.h"
|
#include "audio/audio_driver.h"
|
||||||
@ -262,6 +263,19 @@ bool core_ctl(enum core_ctl_state state, void *data)
|
|||||||
return retro_init_libretro_cbs(&retro_ctx);
|
return retro_init_libretro_cbs(&retro_ctx);
|
||||||
case CORE_CTL_DEINIT:
|
case CORE_CTL_DEINIT:
|
||||||
return retro_uninit_libretro_cbs(&retro_ctx);
|
return retro_uninit_libretro_cbs(&retro_ctx);
|
||||||
|
case CORE_CTL_VERIFY_API_VERSION:
|
||||||
|
{
|
||||||
|
unsigned api_version = core.retro_api_version();
|
||||||
|
RARCH_LOG("Version of libretro API: %u\n", api_version);
|
||||||
|
RARCH_LOG("Compiled against API: %u\n", RETRO_API_VERSION);
|
||||||
|
|
||||||
|
if (api_version != RETRO_API_VERSION)
|
||||||
|
{
|
||||||
|
RARCH_WARN("%s\n", msg_hash_to_str(MSG_LIBRETRO_ABI_BREAK));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case CORE_CTL_NONE:
|
case CORE_CTL_NONE:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -72,7 +72,9 @@ enum core_ctl_state
|
|||||||
|
|
||||||
CORE_CTL_RETRO_SERIALIZE,
|
CORE_CTL_RETRO_SERIALIZE,
|
||||||
|
|
||||||
CORE_CTL_RETRO_UNSERIALIZE
|
CORE_CTL_RETRO_UNSERIALIZE,
|
||||||
|
|
||||||
|
CORE_CTL_VERIFY_API_VERSION
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct retro_ctx_serialize_info
|
typedef struct retro_ctx_serialize_info
|
||||||
|
@ -1478,14 +1478,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RARCH_CTL_VERIFY_API_VERSION:
|
case RARCH_CTL_VERIFY_API_VERSION:
|
||||||
{
|
core_ctl(CORE_CTL_VERIFY_API_VERSION, NULL);
|
||||||
unsigned api_version = core.retro_api_version();
|
|
||||||
RARCH_LOG("Version of libretro API: %u\n", api_version);
|
|
||||||
RARCH_LOG("Compiled against API: %u\n", RETRO_API_VERSION);
|
|
||||||
|
|
||||||
if (api_version != RETRO_API_VERSION)
|
|
||||||
RARCH_WARN("%s\n", msg_hash_to_str(MSG_LIBRETRO_ABI_BREAK));
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case RARCH_CTL_FILL_PATHNAMES:
|
case RARCH_CTL_FILL_PATHNAMES:
|
||||||
rarch_init_savefile_paths();
|
rarch_init_savefile_paths();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user