mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
https://github.com/OpenRCT2/OpenRCT2/pull/20502 changed how startup is handled. This affected Android as well and changed AndroidClassLoader to be initialized statically, but this turns out to be problematic due to JVM not being fully initialized in our context by this time. To fix this, move AndroidClassLoader initialization to JNI_OnLoad call, where JVM is fully available. Additionally, guard against multiple calls to JNI_OnLoad, an issue present on Linux-like systems (including Android).