74 Commits

Author SHA1 Message Date
Tom Pratt 1d1c9696ae lint formatting 2026-05-19 12:03:02 +02:00
Tom Pratt 06cc09cf09 Pass immutable games list to NetplayUICallbacks
Remove corresponding jni config.

Rename Netplay to NetplaySession in jni config to match new kotlin name.
2026-05-19 12:03:02 +02:00
Tom Pratt 86de5ef4b0 Handle traversal state changes and errors
Traversal connections show in the joining info UI.
Non fatal errors show the retry button.
Fatal errors end the netplay session.
2026-05-19 12:03:00 +02:00
Tom Pratt 77f08364db Create NetPlayServer and start game 2026-05-19 12:02:59 +02:00
Tom Pratt acbf9e155f Game digest progress dialog
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.
2026-05-19 12:02:58 +02:00
Tom Pratt 117d1d71ac Handle desync messages
Show them in the chat window and also in a toast during game play.
2026-05-19 12:02:58 +02:00
Tom Pratt abd324e98d Make NetplaySession not a singleton
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.
2026-05-19 12:02:58 +02:00
Tom Pratt 8141a74671 Show save transfer progress
When transferring saves from the host. Equivalent of ChunkedProgressDialog in QT.
2026-05-19 12:02:57 +02:00
Tom Pratt b1b133b036 Implement OnConnectionLost, show a dialog on the main netplay screen forcing the user to exit 2026-05-19 12:02:56 +02:00
Tom Pratt 38b5c7370c Implement StopGame callback and use it to finish the emulation activity 2026-05-19 12:02:56 +02:00
Tom Pratt c32732714e Implement more NetPlayUICallbacks
Includes chat, game changes, pad buffer changes and host input authority. Merges them all into the chat window.
2026-05-19 12:02:55 +02:00
Tom Pratt d9e2725e85 Implement player list 2026-05-19 12:02:55 +02:00
Tom Pratt f52ca02ca2 Show client connection errors and handle connection result
If result is a success sent event to launch the next netplay screen. if it fails, clear up the netplay client
2026-05-19 12:02:54 +02:00
Tom Pratt 3ed9174208 Store netplay BootSessionData and use it to run the netplay game 2026-05-19 12:02:54 +02:00
Tom Pratt 766374434c Pass game list to NetPlayUICallbacks and implement OnMsgChangeGame, OnMsgStartGame, FindGameFile 2026-05-19 12:02:54 +02:00
Simonx22 cdc21490e4 Android: Convert NetworkHelper to Kotlin 2025-11-11 15:58:07 -05:00
Simonx22 82f658a28f Android: Use the shared HTTP analytics backend
We can now route Android analytics through Common::HttpAnalyticsBackend, drop the Volley sender, and keep the JNI layer limited to only transfer metadata since https://bugs.dolphin-emu.org/issues/11772 has been fixed.
2025-11-08 12:14:40 -05:00
JosJuice f99d3dbd5c Android: Ask system for optimal audio buffer size and sample rate
This can reduce audio latency according to
https://developer.android.com/ndk/guides/audio/opensl/opensl-prog-notes#perform.

Previously we were using the hardcoded values of 48000 Hz and 256 frames
per buffer. The sample rate we use with this change is 48000 Hz on all
devices I'm aware of, but the buffer size does vary across devices.

Terminology note: The old code used the term "sample" to refer to what
Android refers to as a "frame". "Frame" is a clearer term to use for
this, so I've changed OpenSLESStream's terminology. One frame consists
of one sample per channel.
2025-05-25 11:59:33 +02:00
Sepalani dbc09bfb0d Android: Add emulated Wii Speak 2025-05-07 20:33:22 +04:00
JosJuice 516c1314d2 Android: Don't use separate thread for MotionAlertDialog
This is an Android continuation of bc95c00. We now call
InputDetector::Update immediately after receiving an input event from
Android instead of periodically calling it in a sleep loop. This
improves detection of very short inputs, which are especially likely to
occur for volume buttons on phones (or at least on my phone) if you
don't intentionally keep them held down.
2025-03-23 21:39:04 +01:00
Jordan Woyak ddb82a5e8c InputCommon/ControllerEmu: Break out functionality of EmulatedController
to eliminate redundant unused members in Wii Remote extension objects.
2025-03-15 14:30:43 -05:00
JosJuice ea7928b3cd Android: Replace log type names map with array
Storing the log type names in a map results in them getting re-sorted by
their keys, which doesn't quite give us the sorting we want. In
particular, the Achievements category ended up being sorted at R (for
RetroAchivements) instead of at A. Every use of the map is just
iterating through it, so there's no real reason why it has to be a map
anyway.
2024-06-15 20:06:34 +02:00
mitaclaw be27c4f877 NativeLibrary: Create displayToastMsg Method 2024-04-06 15:41:23 -07:00
JosJuice d80f9d53fc Android: Expose config changed callbacks 2023-12-07 21:09:17 +01:00
JosJuice 190e71a318 Android: Use JNI for setting/getting ISO paths
This gets rid of the last Android-specific code that directly interfaces
with INI files.
2023-09-02 12:58:20 +02:00
JosJuice f9959656e7 Merge pull request #11919 from t895/kotlin-controls
Android: Convert "features.input" package to Kotlin
2023-08-26 19:10:56 +02:00
Charles Lombardo 09c2c6541d Android: Convert GameFileCache to Kotlin 2023-08-25 14:54:17 -04:00
Charles Lombardo a56ee1a62e Android: Convert GameFile to Kotlin 2023-08-25 14:54:16 -04:00
Charles Lombardo 9ac1847cbd Android: Convert NumericSetting to Kotlin 2023-08-25 14:20:31 -04:00
Charles Lombardo 82298dc408 Android: Convert CoreDevice to Kotlin 2023-08-25 14:20:31 -04:00
Charles Lombardo 3011c0dc64 Android: Convert EmulatedController to Kotlin 2023-08-25 13:31:21 -04:00
Charles Lombardo 4ce069cf4f Android: Convert ControlReference to Kotlin 2023-08-25 13:31:04 -04:00
Charles Lombardo 7c79ff0100 Android: Convert ControlGroup to Kotlin 2023-08-25 13:30:42 -04:00
Charles Lombardo fafbb2199e Android: Convert Control to Kotlin 2023-08-25 13:30:23 -04:00
Joshua de Reeper cf3e8714eb Android: Add Hashmap to IDCache 2023-05-28 19:01:21 +12:00
JosJuice c2779aef06 Android: Add the advanced input mapping dialog
It's missing a lot of features from the PC version for now, like
buttons for inserting functions and the ability to see what the
expression evaluates to. I mostly just wanted to get something in
place so you can set up rumble.

Co-authored-by: Charles Lombardo <clombardo169@gmail.com>
2023-03-07 17:39:30 +01:00
JosJuice 1c26a85e35 Android: Add NumericSetting support 2023-03-03 22:28:24 +01:00
JosJuice 2c529b9db1 Android: Add new input mapping implementation 2023-03-03 22:28:24 +01:00
JosJuice 68ebb5c33e Android: Remove old rumble implementation 2023-03-03 22:28:23 +01:00
Mai 78e8669bac Merge pull request #11614 from t895/kotlin-cheats
Android: Convert Cheats Activity to Kotlin
2023-03-02 15:04:19 -05:00
Charles Lombardo ec7b811de3 Android: Convert RiivolutionPatches to Kotlin 2023-03-01 14:38:02 -05:00
Charles Lombardo 9e090c6bab Android: Convert GraphicsMod to Kotlin 2023-03-01 13:34:34 -05:00
Charles Lombardo 5f6995fe6c Android: Convert GraphicsModGroup to Kotlin 2023-03-01 13:34:09 -05:00
Charles Lombardo 9cbe66bce4 Android: Convert PatchCheat to Kotlin 2023-03-01 13:33:16 -05:00
Charles Lombardo 408b6cb50c Android: Convert ARCheat to Kotlin 2023-03-01 13:32:42 -05:00
JosJuice 8f410bff15 Android: Add graphics mods support to CheatsActivity 2022-07-23 21:58:45 +02:00
OatmealDome 7c86baee50 WiiUpdateCallback: Add interface for update callback 2022-01-21 17:14:16 -05:00
JosJuice 22a1f3422c Android: Add Riivolution patch configuration 2021-10-30 23:24:37 +02:00
JosJuice 4d609c769f Android: Implement basic read-only cheats list 2021-09-16 16:46:48 +02:00
Pierre Bourdon e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00