From 37715c4029d9e8605bbbe5dd1867cae6f120481a Mon Sep 17 00:00:00 2001
From: Eddy Jansson <[EMAIL REDACTED]>
Date: Fri, 5 Dec 2025 09:02:43 +0100
Subject: [PATCH] Document need to include SDL_revision.h
If you want access to the SDL_REVISION define,
you must explicitly include this header.
Language like this was present in the SDL2 version,
but disappeared in SDL3, even though it's still true.
---
include/SDL3/SDL_revision.h | 3 +++
include/SDL3/SDL_version.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/SDL3/SDL_revision.h b/include/SDL3/SDL_revision.h
index f0f57cd59b672..8261addfcd4aa 100644
--- a/include/SDL3/SDL_revision.h
+++ b/include/SDL3/SDL_revision.h
@@ -44,6 +44,9 @@
* clue in debugging forensics and not something the app will parse in any
* way.
*
+ * SDL_revision.h must be included in your program explicitly if you want access
+ * to the SDL_REVISION constant.
+ *
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_REVISION "Some arbitrary string decided at SDL build time"
diff --git a/include/SDL3/SDL_version.h b/include/SDL3/SDL_version.h
index 74aa7821d0a25..64476e2eca652 100644
--- a/include/SDL3/SDL_version.h
+++ b/include/SDL3/SDL_version.h
@@ -153,7 +153,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetVersion(void);
*
* This value is the revision of the code you are linking against and may be
* different from the code you are compiling with, which is found in the
- * constant SDL_REVISION.
+ * constant SDL_REVISION if you explicitly include SDL_revision.h
*
* The revision is an arbitrary string (a hash value) uniquely identifying the
* exact revision of the SDL library in use, and is only useful in comparing