Commit Graph

30 Commits

Author SHA1 Message Date
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
Christian Aguilera 5b757024c4 GameListModel instance ownership transferred back to the GameList instance. The GameListModel instance will be passed as a constructor parameter where needed. 2020-10-01 22:09:45 +02:00
JosJuice a41166bb37 Make netplay's "same game" check more robust
Instead of comparing the game ID, revision, disc number and name,
we can compare a hash of important parts of the disc including
all the aforementioned data but also additional data such as the
FST. The primary reason why I'm making this change is to let us
catch more desyncs before they happen, but this should also fix
https://bugs.dolphin-emu.org/issues/12115. As a bonus, the UI can
now distinguish the case where a client doesn't have the game at
all from the case where a client has the wrong version of the game.
2020-08-02 22:46:53 +02:00
Lioncash e8ee4e835e DolphinQt/NetPlayDialog: Remove unimplemented SetGame() prototype
This isn't implemented anywhere, so the prototype can be removed.
2020-01-27 15:25:04 -05:00
Techjar a3d8a8be06 NetPlay: Remove 'reduce polling rate' option
With the SI poll line count fixed, pretty much all games are polling
twice per frame anyways, making this option superfluous. Since it's a
bit of a gross hack and makes DTMs incompatible with console, let's
just bin it.
2019-08-26 02:11:49 -04:00
Brandon Rothweiler fdfa14d9cc Show a message in netplay chat when a player joins or leaves 2019-07-30 20:14:51 -07:00
Techjar b0b4b69d6e Qt/NetPlayDialog: Change network mode options to radio buttons
This changes the Host Input Authority and Golf Mode checkboxes into a
set of radio buttons, consisting of Fair Input Delay, Host Input
Authority, and Golf Mode. This represents the 3 network modes we have.

Although Golf Mode is just an extension of Host Input Authority, it's
more logical to the user to present it as a separate option, rather
than enabling the Golf Mode checkbox only when Host Input Authority is
enabled. This also eliminates the need to first enable Host Input
Authority before Golf Mode can be enabled.

This also adds tooltips to provide brief descriptions of the options,
as well as reintroducing tooltips that were previously removed.
2019-05-31 02:33:41 -04:00
Techjar 199486ffb6 Qt/NetPlayDialog: Move settings loading into LoadSettings 2019-05-30 18:07:03 -04:00
spycrab f7dcd191e3 Qt/NetPlayDialog: Move MD5 button into menubar 2019-04-23 22:37:22 +02:00
spycrab 8b6bb39e82 Qt/NetPlay: Show feedback for index adding 2019-04-11 21:26:00 +02:00
Techjar 7870704087 NetPlay: Fix hosting being stuck if player leaves during pending start
The logic didn't account for the case where a player leaves, so the
host would be left in a dangling state where the UI is disabled but the
game won't start, requiring a full restart of Dolphin to fix.
2019-04-07 06:22:31 -04:00
Techjar 6c393f9ff4 Add imgui golf mode overlay 2019-04-05 07:01:03 -04:00
Techjar 1a12876330 NetPlay: Implement golf mode
This is an extension of host input authority that allows switching the
host (who has zero latency) on the fly, at the further expense of
everyone else's latency. This is useful for turn-based games where the
latency of players not on their turn doesn't matter.

To become the so-called golfer, the player simply presses a hotkey.
When the host is the golfer, latency is identical to normal host input
authority.
2019-04-05 07:01:03 -04:00
spycrab 7cfb626a83 Add imgui-based Netplay Chat 2019-03-23 20:13:24 +01:00
Techjar b65faa0549 Qt/NetPlayDialog: Move most options into a menu bar
This eliminates the clutter of checkboxes at the bottom of the window.
A QAction within a QMenu cannot have a tooltip however, so they have
been removed and the options will be documented on the wiki.
2019-03-05 05:56:22 -05:00
Techjar b06b7e5686 NetPlay: Add full Wii save sync
This adds the ability to sync all Wii saves, instead of only the
selected game. Useful for cases like launching a game though GeckoOS.
2018-11-19 06:37:09 -05:00
Techjar d94922002b NetPlay: Implement chunked data transfer
This sends arbitrary packets in chunks to be reassembled at the other
end, allowing large data transfers to be speed-limited and interleaved
with other packets being sent. It also enables tracking the progress of
large data transfers.
2018-11-19 06:37:09 -05:00
Techjar 94d7e7d78a Qt/NetPlayDialog: Add external IP to interface combo box
The interface address isn't particularly useful in most circumstances
(playing over internet), and we have a way to get the external IP now,
so displaying it in the dialog is useful.
2018-11-15 03:29:28 -05:00
Pierre Bourdon 6b7a1ca6d1
Merge pull request #7535 from UnclePunch/synccodes
Netplay: Sync AR and gecko codes with clients
2018-11-13 22:39:25 +01:00
Techjar ef89e4e70c NetPlay: Sync power button event
This fixes the deadlock on shutdown when Wii Remotes are in use.
2018-11-12 22:32:18 -05:00
Vin Bertinelli 469f29350f Netplay: Sync codes
Adds a tickbox to the server's window to syncronize codes. Codes
are temporarily sent to each client and are used for the duration of the
session.

Saves the "sync codes" tickbox as per PR Netplay: Properly save hosting
settings #7483
2018-10-29 23:00:51 +01:00
Zexaron 550aa93ed0 NetPlay: Properly save Hosting GUI settings 2018-10-13 10:35:42 +02:00
Techjar 5519efa66e NetPlay host input authority mode
Currently, each player buffers their own inputs and sends them to the
host. The host then relays those inputs to everyone else. Every player
waits on inputs from all players to be buffered before continuing. What
this means is all clients run in lockstep, and the total latency of
inputs cannot be lower than the sum of the 2 highest client ping times
in the game (in 3+ player sessions with people across the world, the
latency can be very high).

Host input authority mode changes it so players no longer buffer their
own inputs, and only send them to the host. The host stores only the
most recent input received from a player. The host then sends inputs
for all pads at the SI poll interval, similar to the existing code. If
a player sends inputs to slowly, their last received input is simply
sent again. If they send too quickly, inputs are dropped. This means
that the host has full control over what inputs are actually read by
the game, hence the name of the mode. Also, because the rate at which
inputs are received by SI is decoupled from the rate at which players
are sending inputs, clients are no longer dependent on each other. They
only care what the host is doing. This means that they can set their
buffer individually based on their latency to the host, rather than the
highest latency between any 2 players, allowing someone with lower ping
to the host to have less latency than someone else.

This is a catch to this: as a necessity of how the host's input sending
works, the host has 0 latency. There isn't a good way to fix this, as
input delay is now solely dependent on the real latency to the host's
server. Having differing latency between players would be considered
unfair for competitive play, but for casual play we don't really care.
For this reason though, combined with the potential for a few inputs to
be dropped on a bad connection, the old mode will remain and this new
mode is entirely optional.
2018-08-26 17:10:23 -04:00
Sleepy Flower Girl 158c0d54b1 Force IPv4 on external IP addresses 2018-08-13 21:17:38 -04:00
Sleepy Flower Girl c2aedb7649 Adds a UI for accepting Discord join requests in Dolphin
also did these things
fixed crash from joining user that isn't hosting via a direct connection
current game stat can now pass to override the current game in config
uses ip endpoint from dolphin.org
2018-08-06 16:12:03 -04:00
Techjar 7036299a92 NetPlay: Improve settings synchronization and UI
Most settings which affect determinism will now be synced on NetPlay.
Additionally, there's a strict sync mode which will sync various
enhancements to prevent desync in games that use EFB reads.

This also adds a check for all players having the IPL.bin file, and
doesn't load it for anyone if someone is missing it. This prevents
desyncs caused by mismatched system fonts.

Additionally, the NetPlay window was getting too wide with checkboxes,
so FlowLayout has been introduced to make the checkboxes take up
multiple rows dynamically. However, there's some minor vertical
centering issues I haven't been able to solve, but it's better than a
ridiculously wide window.
2018-07-26 17:23:04 -04:00
Techjar 4407854e9c NetPlay save data synchronization
This adds the functionality of sending the host's save data (raw memory
cards, as well as GCI files and Wii saves with a matching GameID) to
all other clients. The data is compressed using LZO1X to greatly reduce
its size while keeping compression/decompression fast. Save
synchronization is enabled by default, and toggleable with a checkbox
in the NetPlay dialog.

On clicking start, if the option is enabled, game boot will be delayed
until all players have received the save data sent by the host. If any
player fails to receive it properly, boot will be cancelled to prevent
desyncs.
2018-07-19 18:09:20 -04:00
spycrab 9ab489aab8 Qt/NetPlayDialog: Show alerts when events happen
Displays an alert when you receive a message or a player joins / leaves
2018-07-12 17:33:12 +02:00
Lioncash 675260b0f7
Core: Namespace NetPlay utilities under the NetPlay namespace
Previously there was only one function under the NetPlay namespace,
which is kind of silly considering we have all of these other types
and functions existing outside of the namespace.

This moves the rest of them into the namespace.

This gets some general names, like Player, for example, out of the global namespace.
2018-07-06 19:53:23 -04:00
spycrab 13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00