diff --git a/dynamic.c b/dynamic.c index 338d83adda..1510005d06 100644 --- a/dynamic.c +++ b/dynamic.c @@ -436,6 +436,11 @@ static bool environment_cb(unsigned cmd, void *data) break; } + case SNES_ENVIRONMENT_SET_CORE_VERSION: + strlcpy(g_extern.system.version, (const char*)data, sizeof(g_extern.system.version)); + SSNES_LOG("Environ SET_CORE_VERSION: %s\n", g_extern.system.version); + break; + default: SSNES_LOG("Environ UNSUPPORTED (#%u).\n", cmd); return false; diff --git a/general.h b/general.h index 2792c5d778..2fd7c5a35d 100644 --- a/general.h +++ b/general.h @@ -309,6 +309,7 @@ struct global char *environment_split; unsigned rotation; + char version[64]; } system; struct diff --git a/libsnes.hpp b/libsnes.hpp index 92f7072962..5a2a96ba0c 100755 --- a/libsnes.hpp +++ b/libsnes.hpp @@ -135,6 +135,9 @@ extern "C" { // Is only implemented if rotation can be accelerated by hardware. // Valid values are 0, 1, 2, 3, which rotates screen by 0, 90, 180, 270 degrees // counter-clockwise respectively. + // +#define SNES_ENVIRONMENT_SET_CORE_VERSION 15 // const char * -- + // Sets version of core as a human readable string. struct snes_message {