Added version checking to SDLActivity.java
Make sure the SDL java and C code match when updating SDL in a game. Right now we're assuming that we only have to make sure release versions match. We can extend the version string with an interface version if we need more fine grained sanity checking. Fixes https://github.com/libsdl-org/SDL/issues/1540
This commit is contained in:
parent
3607f8316f
commit
5291e5cb76
4 changed files with 46 additions and 2 deletions
|
@ -56,6 +56,17 @@ else
|
|||
not_ok "CMakeLists.txt $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
major=$(sed -ne 's/.*SDL_MAJOR_VERSION = \([0-9]*\);/\1/p' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java)
|
||||
minor=$(sed -ne 's/.*SDL_MINOR_VERSION = \([0-9]*\);/\1/p' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java)
|
||||
micro=$(sed -ne 's/.*SDL_MICRO_VERSION = \([0-9]*\);/\1/p' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java)
|
||||
version="${major}.${minor}.${micro}"
|
||||
|
||||
if [ "$ref_version" = "$version" ]; then
|
||||
ok "SDLActivity.java $version"
|
||||
else
|
||||
not_ok "android-project/app/src/main/java/org/libsdl/app/SDLActivity.java $version disagrees with SDL_version.h $ref_version"
|
||||
fi
|
||||
|
||||
major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.os2)
|
||||
minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.os2)
|
||||
micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.os2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue