We originally only supported loading custom GPU drivers on Adreno
devices, but a8fc326 made us also show the custom GPU driver option on
Mali devices. Now I have found out from a user that custom GPU drivers
are also available for Xclipse. I think we should just remove the check
for what GPU the device has.
In the future, I would like to refactor HotkeyManager to give us a nice
way to have Android-exclusive hotkeys without relying on ifdefs. But I
want to get this one Android-exclusive hotkey into Dolphin before the
next release anyway, because this is one of the most requested hotkeys,
if not the most requested hotkey.
Only poll for hotkeys while EmulationActivity is resumed and at least
one supported hotkey is mapped. Otherwise the scheduler thread waits on
an event instead of polling.
Also trigger abort / dismiss from the host when closing the dialog.
Add explicit "finished" property to GameDigestProgress since the UI is different depending on this state.
By using the title database we ship with Dolphin, we get more uniform
game titles than if we grab what's in each game's opening.bnr file.
It also becomes possible for users to supply a custom titles.txt file.
This has been implemented in DolphinQt since a long time ago.
We just about get away with using a StateFlow in NetplaySession since the host sends AbortGameDigest when closing their own dialog. Without that it would be harder for the UI to distinguish between subsequent dialogs. If that wasn't the case then NetplaySession might need to expose the individual progress and result updates and have the view model assemble it into the overall GameDigestProgress.
Create a new NetplaySession each time we try to join a netplay game. Hold onto it in NetplayManager so its available to the different activities that need to access it. Close the session when backing out of the netplay UI. Some guardrails in case things go out of sync: creating a session closes the old one if it is still around for some reason, finalizer in NetplaySession to release native resources if not closed explicitly for some reason. Profiling done to ensure all kotlin and native objects are successfully cleared / garbage collected.
Boot session data is already handled when the game is booted so this is just fallback in case the game launch fails in some weird way.
Add missing @Keep annotations to functions called from C++
For some reason, NativeLibrary.kt calling Log for the alert message text
makes Dolphin die with a JNI error. Supposedly the jstring passed to the
logging function is invalid. I don't understand why, because the dialog
that we show right afterwards is able to read the string just fine. The
error happens even if I pass the string directly to Log without
prepending any extra text.
There's no real downside to having the logging in C++ instead of Kotlin,
so let's move it to C++ to avoid the JNI error.