add legacy get_version & Full get_version

Co-authored-by: Ylarod <me@ylarod.cn>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
Ylarod
2025-11-03 08:31:25 +08:00
committed by ShirkNeko
parent 59339b806a
commit bfed2d700a
3 changed files with 55 additions and 6 deletions

View File

@@ -8,11 +8,12 @@
#include <linux/capability.h>
NativeBridgeNP(getVersion, jint) {
uint32_t version = get_version();
if (version > INT32_MAX) {
LogDebug("Version overflow: %u", version);
}
return (jint)version;
uint32_t version = get_version();
if (version > 0) {
return (jint)version;
}
// try legacy method as fallback
return legacy_get_version();
}
// get VERSION FULL