Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Platform code #20502

Merged
merged 7 commits into from
Jun 28, 2023
Merged

Cleanup Platform code #20502

merged 7 commits into from
Jun 28, 2023

Conversation

ZehMatt
Copy link
Member

@ZehMatt ZehMatt commented Jun 27, 2023

Time that we get rid of this old legacy code, we don't need the CoreInit thing at all and a lot of functionality can be replaced with chrono, filesystem etc.

Will have to keep the commits as small as possible as I have no proper way other than the CI to see if I break something.

@ZehMatt ZehMatt marked this pull request as ready for review June 27, 2023 20:36
@ZehMatt ZehMatt added this to the v0.4.6 milestone Jun 28, 2023
@ZehMatt ZehMatt merged commit a7bbe77 into OpenRCT2:develop Jun 28, 2023
21 checks passed
@ZehMatt ZehMatt deleted the platform-cleanup branch June 28, 2023 13:25
janisozaur added a commit to janisozaur/OpenRCT2 that referenced this pull request Oct 17, 2023
OpenRCT2#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).
janisozaur added a commit to janisozaur/OpenRCT2 that referenced this pull request Oct 17, 2023
OpenRCT2#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).
janisozaur added a commit to janisozaur/OpenRCT2 that referenced this pull request Oct 17, 2023
OpenRCT2#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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants