-
Notifications
You must be signed in to change notification settings - Fork 398
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
Fix GameHost.Collect()
being called twice on android
#6272
Conversation
We already trim memory on a `SDL_EVENT_LOW_MEMORY`.
I actually noticed it before, so I removed it in my cleanup commit, but I guess some changes after mine added it back? Though I think I should have added a comment in the commit to make sure it was intended. |
i guess we have a new sdl3-cs build now? |
Probably be best to get another sdl3-cs package out to get the fix for #6299. |
This includes SDL3 change: libsdl-org/SDL#9654
a724243
to
2c7704b
Compare
I've bumped Perhaps the |
Depends on (to have identical behaviour):
onTrimMemory()
instead ofonLowMemory()
on Android libsdl-org/SDL#9654SDL sends us a
SDL_EVENT_LOW_MEMORY
when Android'sonLowMemory()
handler fires. o!f handles this event and callsGameHost.Collect()
. We also have our own handling inonTrimMemory()
. Depending on how android handles those two functions, we may collect memory twice.I think it makes more sense to just have
SDL_EVENT_LOW_MEMORY
handling, and not have custom logic just for android.This PR was originally meant to pick out the useful parts from https://github.com/ppy/osu-framework/pull/6269/files#r1584189904, but I've since realised SDL already sends us a low memory event that we handle.