Commit Graph

45874 Commits

Author SHA1 Message Date
Tom Pratt f63b81dd39 Use unique_ptr when creating netplay client / server 2026-05-19 12:03:01 +02:00
Tom Pratt 22863b3703 Add @Keep annotation to Player constructor
Since it's only instantiated from c++.
2026-05-19 12:03:01 +02:00
Tom Pratt 1bc64a0e6e Fix netplay license headers 2026-05-19 12:03:01 +02:00
Tom Pratt df5e7a9767 Update compose dependencies
Was using 2025 instead of 2026! Fixed some buggy bottom sheet behaviour.

Minor tidying of the chat UI in the bottom sheet
2026-05-19 12:03:01 +02:00
Tom Pratt 4c0bf2944b Implement DoAllPlayersHaveGame() check 2026-05-19 12:03:01 +02:00
Tom Pratt 76ae445694 Add network mode picker for host 2026-05-19 12:03:00 +02:00
Tom Pratt 1c2806dfe9 Add host buffer settings for fair input delay mode
Also rename max buffer to client buffer for better consistency with settings and c++
2026-05-19 12:03:00 +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 86a0f22887 Show joining info for local and external IP addresses
Doesn't support traversal yet
2026-05-19 12:03:00 +02:00
Tom Pratt eb02680cb6 Separate out GetExternalIPAddress helper function
De-duplicates the two inline implementations and prepares it for use from Android.
2026-05-19 12:03:00 +02:00
Tom Pratt 6655672ee3 Add ability to choose game when hosting
Also fix bottom sheets so they survive rotation
2026-05-19 12:02:59 +02:00
Tom Pratt 68e9fd6cde Send own messages to chat
A player's own messages don't come back via the server.
2026-05-19 12:02:59 +02:00
Tom Pratt 77f08364db Create NetPlayServer and start game 2026-05-19 12:02:59 +02:00
Tom Pratt b63ccacdfa Hosting UI 2026-05-19 12:02:59 +02:00
Tom Pratt f9baecd5ed Implement OnMsgPowerButton 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 183d6d778c Use existing settings API instead of custom jni calls 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 480968f05e Dont try to load temporary save states when launching netplay
An orientation change can trigger this code path immediately when a game starts. e.g. dolphin is portrait when launching the game but settings force gameplay to landscape. We want to avoid this and continue to the netplay launch code below.

If the user backgrounds dolphin during netplay and then resumes after the process has died it will actually resume from the save state in single player mode, not sure if thats good or bad but fine for now.

Netplay doesnt handle rotation very well, seems to go more and more out of sync the more rotations.
2026-05-19 12:02:57 +02:00
Tom Pratt b52ffa3e8b Release boot session data during Netplay cleanup
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++
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 86956b21be Settings refactor
Remove the big saveSetup function and set individual settings immediately after being changed in the UI. Group them all under Netplay.Settings
2026-05-19 12:02:56 +02:00
Tom Pratt 65e4c60158 Max buffer 2026-05-19 12:02:56 +02:00
Tom Pratt e49451b28e Put players table in an OutlinedBox, makes the UI look more consistent. 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 dfa3384281 Netplay chat UI 2026-05-19 12:02:55 +02:00
Tom Pratt d9e2725e85 Implement player list 2026-05-19 12:02:55 +02:00
Tom Pratt af2fda5649 Reorder netplay class
Put all the boring settings at the bottom to reduce scrolling!
2026-05-19 12:02:55 +02:00
Tom Pratt b72f3c1afc Add mostly empty Netplay screen, equivalent of NetPlayDialog in QT.
All it can do at this point is quit the current netplay session when backing out of this screen.
2026-05-19 12:02:55 +02:00
Tom Pratt 5527e8138e Move NetplaySetupScreen to its own file 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
Tom Pratt 1464fdfc28 Add NetPlayClient join and stub NetPlayUICallbacks 2026-05-19 12:02:54 +02:00
Tom Pratt a1983e5fa2 Add Netplay settings JNI layer and wire up NetplaySetupViewModel 2026-05-19 12:02:54 +02:00
Tom Pratt f10022f2dc Netplay setup UI
Only for connecting, no hosting yet.
2026-05-19 12:02:53 +02:00
Tom Pratt c716c32ce8 Add compose dependencies for Android and empty NetplaySetupActivity
Derive compose colour theming from the existing XML styles already set at the activity level.
2026-05-19 12:02:53 +02:00
Dentomologist 7b69949cec Merge pull request #14581 from matheuswillder/NFS-Gecko-Codes
GameINI: Action Replay/Gecko codes to unlock Most Wanted Black Edition and Carbon Collector's Edition in GameCube/Wii's Need for Speed
2026-05-18 13:59:06 -07:00
Admiral H. Curtiss 30c7c7e2b7 Merge pull request #14653 from Tilka/net_accept
IOS/Network: reduce log verbosity of SO_EAGAIN to info level
2026-05-18 22:04:29 +02:00
Tillmann Karras 4618e4bb40 IOS/Network: reduce log verbosity of SO_EAGAIN to info level
Otherwise IOCTL_SO_ACCEPT is very noisy until a client connects.
2026-05-15 23:01:27 +01:00
JMC47 604d13e1cc Merge pull request #14448 from TheShrubMaster/main
AudioCommon: Add individual Wiimote audio mixer
2026-05-14 18:36:49 -04:00
Weston Heard adcfbda2a3 AudioCommon: Add individual Wiimote audio mixer
Also incremented STATE_VERSION.
2026-05-14 14:50:45 -05:00
Dentomologist d0d354fbed Merge pull request #14635 from JosJuice/android-panic-log-crash
Android: Move alert message log from Kotlin to C++
2026-05-12 17:14:06 -07:00
JosJuice 0f72b69dc7 PPCAnalyst: Split "in use" analysis into reads and writes
If the last write to a register comes before the last read of it,
we can write the register to ppcState after the last write instead of
after the last read. This will hopefully help spread out m_ppc_state
writes across a code block, improving pipelining. Also, if there's a
conditional branch that's after the last write but before the last read,
instead of needing to emit one m_ppc_state write on each side of the
branch, we now only need to emit one m_ppc_state write.

A note about the changes made to stmw and mfcr: These instructions don't
write to any GPRs or CRs respectively – they only read from them.
With this commit, there are no longer any cases where registers get
written back to m_ppc_state after an instruction that just reads from
them, so we can get rid of all STP logic from these two instructions.
lmw still needs its STP logic, since that one does write to registers.
2026-05-12 14:38:53 +02:00
Joshua Vandaële 9414196958 Externals: Update SDL to release-3.4.8
This jumps us up two releases, both of which only introduce bug fixes. Changes potentially relevant to us are:

[3.4.6](https://github.com/libsdl-org/SDL/tree/release-3.4.6):
- Fixed Xbox controllers being unresponsive on preview release of Windows 11
- Fixed the menu button state on controllers on Apple platforms

[3.4.8](https://github.com/libsdl-org/SDL/tree/release-3.4.8) (hotfix release):
- Fixed a controller related crash on Windows, introduced in 3.4.6
2026-05-12 09:51:15 +02:00
Admiral H. Curtiss 34311f5fa2 Merge pull request #14592 from jordan-woyak/memcard-manager-scrolling
DolphinQt/GCMemcardManager: Set ScrollMode::ScrollPerPixel to make scrolling behavior less annoying.
2026-05-11 23:04:22 +02:00
Admiral H. Curtiss 8bf1f8970a Merge pull request #14613 from JosJuice/wad-tmd-checks
DiscIO: Add extra IsValid checks for VolumeWAD::m_tmd
2026-05-11 22:59:40 +02:00