Original message:
Hey devs,
I'm moth, lead developer of the Cocoon Frontend
For our now playing integration, we're trying to maximise compatability for launching & swapping games without the user having to force close out of the activity.
Dolphin however does not support this at all. No matter what mix of flags and intents I try it just shows the MainActivity.
After a deep dive I found out:
EmulationActivity has an ignoreLaunchRequests check that is set to true until the end of NativeLibrary.Run()
the launch() method returns if its true and just keeps you in MainActivity, never launching the new ROM
This is a problem because Cocoon and other frontends need to use CLEAR_TASK to destroy the existing task and start fresh to load the new ROM.
This destroys EmulationActivity & Fragment but the process still survives so NativeLibrary.Run never returns gracefully.
This makes it so relaunching a new ROM does not work, even if we clear the activity.
Also MainActivity or EmulationActivity doesnt handle onNewIntent()
This would be the graceful way to handle it so we can use CLEAR_TOP | SINGLE_TOP without being ignored.
The two fixes are:
in StartupHandler.HandleInit(), reset the flag before launching so the cleared task's limbo state of ignoreLaunchRequests is reset
The more graceful way would be to add
override fun onNewIntent(intent: Intent)
super.onNewIntent(intent)
setIntent(intent)
StartupHandler.HandleInit(this)
}
in your MainActivity
This would let frontends redeliver game intents without destroying the entire task
After implementation:
I added multiple guards to ensure proper synchronicity and ensure emulators and surfaces are finished before starting a new game.
Frontends can now take advantage of NEW_TASK | CLEAR_TASK to launch a new Dolphin game.
TimeSplitters: Future Perfect is crashing if page table fastmem is
enabled. The reason hasn't been analyzed yet. For the time being, let's
use GameSettings to bring back the old behavior of not having page table
fastmem.
Fixes https://bugs.dolphin-emu.org/issues/14000.
This should stop AchievementManager::LoadGame from being called for the
default ISO when CBoot::BootUp is booting something other than a disc or
IPL (most notably, the Wii Menu), while still detecting all disc changes
that happen while a disc game is running.
Don't copy null terminators from the log's `header.gameid` into
`FifoDataFile`'s `m_game_id`.
Doing so would cause an infinite loop in `Core::GenerateScreenshotName`
as the various concatenations and `fmt::format` calls would then
effectively drop all the timestamps and disambiguating arbitrary numbers
since they followed the null terminator in the gameid, and so the
`File::Exists` calls would always return true.
Fixes https://bugs.dolphin-emu.org/issues/14002.
Check the return value of calls to `GetBuffer` and stop the `WASAPI
handler` sound thread if they fail.
This prevents a crash due to a null pointer dereference if `GetBuffer`
is unable to retrieve a buffer, which could be triggered during
emulation by disabling the selected WASAPI output device in the Windows
Sound settings.
Reasons:
- Only 0.000341% of all Android users were on API 21-23 in the last 365 days.
- These devices are old and likely do not run Dolphin well.
- Android 5.x and 6.0 have been without security updates for about 8 years.
- Staying on API 21–23 blocks AndroidX updates, including Lifecycle.