Fix #2190 - Add GetRaylibVersion function for bindings other than C which do not

read the header file, but may use the compiled binary library.
This commit is contained in:
Steven Schveighoffer 2021-12-06 12:53:52 -05:00
parent 93f05d851d
commit 900f5c2d8f
2 changed files with 8 additions and 0 deletions

View File

@ -1015,6 +1015,7 @@ RLAPI int GetRandomValue(int min, int max); // Get a rando
RLAPI void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
RLAPI const char *GetRaylibVersion(); // Get Raylib version (for non-C bindings)
RLAPI void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
RLAPI void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level

View File

@ -6855,3 +6855,10 @@ const char *TextFormat(const char *text, ...)
return currentBuffer;
}
#endif // !SUPPORT_MODULE_RTEXT
// Get the release of raylib that this library is built with, to assist in non-C bindings determining
// a mismatch of structures and/or parameters.
const char*GetRaylibVersion()
{
return RAYLIB_VERSION;
}