Commit Graph

29 Commits

Author SHA1 Message Date
spycrab 28ca6fec9a
Merge pull request #7202 from Techjar/better-netplay-errors
Improve NetPlay connection error handling
2018-07-06 12:27:03 +02:00
Techjar a29cdb5713 Improve NetPlay connection error handling 2018-07-05 17:15:19 -04:00
Techjar f620128dac Qt: Unparent NetPlay dialog from main window
This should make the NetPlay dialog appear as a separate window in the taskbar on most systems, which makes more sense than a parented dialog as the user will leave it open for an extended period.
2018-07-05 06:48:31 -04:00
spycrab 3ab3ba0d99
Merge pull request #7187 from Techjar/netplay-reduce-poll-rate
Add "Reduce Polling Rate" option to NetPlay
2018-07-04 20:49:29 +02:00
spycrab f7887a442f Qt/NetPlayDialog: Stop games properly 2018-07-04 16:27:16 +02:00
Techjar 5adeca4087 Add "Reduce Polling Rate" option to NetPlay
Normally, SI is polled at a rate defined by the game, and we have to send the pad state to other clients on every poll or else we'll desync. This can result in fairly high bandwidth usage, especially with multiple controllers, mostly due to UDP/IP overhead.

This change introduces an option to reduce the SI poll rate to once per frame, which may introduce up to one frame of additional latency, but will reduce bandwidth usage substantially, which is useful for users on very slow internet connections.

Polling SI less frequently than the game asked for did not seem to cause any problems in my testing, so this should be perfectly safe to do.
2018-06-30 13:13:44 -04:00
Lioncash 6f473b96d0 PowerPC: Convert CPUCore enum into an enum class
Makes the enum values strongly-typed and prevents the identifiers from
polluting the PowerPC namespace. This also cleans up the parameters of
some functions where we were accepting an ambiguous int type and
expecting the correct values to be passed in.

Now those parameters accept a PowerPC::CPUCore type only, making it
immediately obvious which values should be passed in. It also turns out
we were storing these core types into other structures as plain ints,
which have also been corrected.

As this type is used directly with the configuration code, we need to
provide our own overloaded insertion (<<) and extraction (>>) operators
in order to make it compatible with it. These are fairly trivial to
implement, so there's no issue here.

A minor adjustment to TryParse() was required, as our generic function
was doing the following:

N tmp = 0;

which is problematic, as custom types may not be able to have that
assignment performed (e.g. strongly-typed enums), so we change this to:

N tmp;

which is sufficient, as the value is attempted to be initialized
immediately under that statement.
2018-06-15 10:27:59 -04:00
8times9 70b7e852f8 Qt: Remove Dolphin prefix from NetPlay window titles
This makes the NetPlay window titles consistent with other window titles in Dolphin.
2018-06-05 22:27:07 -05:00
spycrab 6268c7b3d5 Qt: Sort includes properly 2018-05-28 04:31:38 +02:00
riking 268b424843 QtUtils/RunOnObject: Make safe under object destruction
Co-Authored-By: cancel <cancel@cancel.fm>
2018-05-21 15:49:19 -07:00
spycrab d8a95834f3 Qt/NetPlayDialog: Improve player list 2018-05-12 18:25:38 +02:00
spycrab 0abce1419b Qt/NetPlayDialog: Fix broken IP label 2018-05-11 21:22:57 +02:00
spycrab 09449e2bca Qt/NetPlayDialog: Use QToolButton instead of a QComboBox 2018-05-10 20:51:12 +02:00
spycrab 26bee93943 Qt/NetPlayDialog: Show more friendly interface names 2018-05-10 20:51:12 +02:00
spycrab 0141ce9305 Qt/NetPlayDialog: Restore window geometry 2018-05-10 20:51:12 +02:00
spycrab 0ee7bddd4f Qt/NetPlayDialog: Add splitter 2018-05-10 20:51:12 +02:00
spycrab 6ea2b2e7e5 Qt/NetPlayDialog: Fix duplicate messages 2018-05-10 20:51:12 +02:00
spycrab 7550389c72 Qt/NetPlayDialog: Escape HTML in chat 2018-05-10 19:19:09 +02:00
spycrab 893c5e694e Qt/NetPlayDialog: Use more readable colors 2018-05-10 19:14:19 +02:00
Lioncash ca6a2970ea
TraversalClient: Make data externally read-only members private
These are only ever queried for state, not written. Therefore, prevent writing to the members
and make them private.
2018-04-16 16:46:44 -04:00
JosJuice 1f1dae367d Unify ISOFile (wx) with GameFile (Qt) and put it in UICommon
The original reason I wanted to do this was so that we can replace
the Android-specific code with this in the future, but of course,
just deduplicating between DolphinWX and DolphinQt2 is nice too.

Fixes:

- DolphinQt2 showing the wrong size for split WBFS disc images.

- DolphinQt2 being case sensitive when checking if a file is a DOL/ELF.

- DolphinQt2 not detecting when a Wii banner has become available
after the game list cache was created.

Removes:

- DolphinWX's ability to load PNGs as custom banners. But it was
already rather broken (see https://bugs.dolphin-emu.org/issues/10365
and https://bugs.dolphin-emu.org/issues/10366). The reason I removed
this was because PNG decoding relied on wx code and we don't have any
good non-wx/Qt code for loading PNG files right now (let's not use
SOIL), but we should be able to use libpng directly to implement PNG
loading in the future.

- DolphinQt2's ability to ignore a cached game if the last modified
time differs. We currently don't have a non-wx/Qt way to get the time.
2018-03-09 13:08:38 +01:00
Michael M 7f812a7a03 RunOnObject: accept pointers to member functions 2017-09-15 10:36:33 -07:00
Michael M 1e27e87d93 QueueOnObject: accept pointers to member functions 2017-09-15 10:36:32 -07:00
Michael M 3e1072b24d Qt: use Settings::EmulationStateChanged 2017-09-13 17:30:18 -07:00
JosJuice 9747a4c697 DolphinQt2: Replace "Pad size" with "Buffer size"
"Pad size" just doesn't make much sense. Let's go with "Buffer size"
instead, since the control for it is labeled "Buffer".

(Another possibility is "Pad buffer size", but I'm against that,
because we've stopped referring to controllers as "pads" in almost
all GUI strings.)
2017-08-11 12:22:44 +02:00
Léo Lam b2c41cec0a Config: Include SYSCONF in base layer
Settings that come from the SYSCONF are now included in Dolphin's
config system as part of the base layer. They are handled in a
special way compared to other settings to make sure they are only
loaded from and saved to the SYSCONF (to avoid different, possibly
contradicting sources of truth).
2017-08-11 15:36:31 +08:00
JosJuice e806928071 Make DolphinQt2 netplay strings more like in DolphinWX 2017-08-10 15:58:04 +02:00
spycrab 366d4c7744 Qt/NetPlay: Use TraversalClient::FailureReason 2017-08-10 15:41:01 +02:00
spycrab 13fac93a29 Qt: Implement NetPlay 2017-08-10 06:49:57 +02:00