74 Commits

Author SHA1 Message Date
twinaphex
5f2e3c283d (netplay)/network) Style nits/cleanups 2019-06-26 07:13:50 +02:00
radius
34be5f399c no need to do nat traversal if using relay 2019-05-26 22:39:46 +02:00
radius
370b9681b8 fix netplay paused spam 2019-05-26 22:39:46 +02:00
Twinaphex
c9cfd1cd89 Silence xcode warnings - unused variables 2019-04-20 16:36:01 +02:00
Twinaphex
5cb2e9f54c
Merge pull request #7883 from GregorR/netplay-share-policy
Different (more intuitive?) default netplay share policy
2019-03-02 18:54:19 +01:00
radius
671e90a415 [discord] party & ask to join refinements 2019-02-06 22:45:05 -05:00
natinusala
c20ab3864d First version of menu widgets (gl only) 2019-02-06 20:48:24 +01:00
orbea
28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
Gregor Richards
b9a07a759b Different (more intuitive?) default netplay share policy
The previous default policy in netplay for sharing was to always share.
This appears to be causing more confusion than anything else, mainly
because the UI is terrible. The UI is a different problem, but for now,
I've changed the share policy: If you netplay with only one input
configured, it will share; if you netplay with multiple inputs, and
don't explicitly ask to share one, each device will get one client.
2019-01-03 16:53:30 -05:00
radius
0a6df1743c [netplay] print upnp failed messages
[cheevos] fix warning
2019-01-01 11:22:58 -05:00
twinaphex
ff4fa3be7a Fix more string is too small warnings 2018-11-25 18:49:04 +01:00
Twinaphex
08a54e45f2 Get rid of a lot of implicit conversions 2018-04-09 15:56:45 +02:00
Gregor Richards
06b402bc14 Fix a bug in remembering device availability for netplay
Really silly bug had netplay forgetting to unset device availability
when a client goes to spectator mode. As a consequence, in certain
configurations, later joins would automatically choose the wrong device,
and you'd have to manually specify a device to get the right one. This
fixes that.
2018-03-21 19:24:58 -04:00
Twinaphex
8bc1d9965d Fix unused variables/etc. 2018-01-23 07:29:04 +01:00
twinaphex
54726aa668 Remove snprintf_p for now 2018-01-23 06:10:21 +01:00
twinaphex
6437e4b4a9 remove tons of unreferenced local variables 2018-01-23 05:49:03 +01:00
Gregor Richards
84baf5db1f Wrong branch index! 2018-01-05 14:27:02 -05:00
Gregor Richards
73bd969ac9 Fixes for slave mode with multiple input devices 2018-01-05 14:27:02 -05:00
Gregor Richards
c01a199493 Netplay input device abstraction, support for mice
This abstracts away the details of particular input devices for netplay,
and adds support for mice and (similar) lightguns. Unfortunately, in
practice, no core handles mice or lightguns in a savestate-safe way, so
they need to be used in stateless mode to be reliable, but they do work.
2018-01-05 14:27:02 -05:00
Gregor Richards
ab669a2db8 Fix a bug that could segfault with fast dis/reconnection. 2018-01-05 14:27:02 -05:00
Gregor Richards
8d5a79fc69 Removing long-obsolete now-disfunctional "netplay flip players" feature 2018-01-05 14:27:02 -05:00
Gregor Richards
c2923f5504 Netplay message for input devices not available. 2018-01-05 14:26:19 -05:00
Gregor Richards
dc9ee8c6bc Don't 0-index device numbers! 2018-01-05 14:26:19 -05:00
Gregor Richards
f7dba84c67 Netplay mode change improvements
(1) All mode change code unified, so server mode changes and client mode
changes and announcements go through the same functions

(2) New messages which are translateable and work with multiple input
devices
2018-01-05 14:26:19 -05:00
Gregor Richards
74901e6161 Whoops, missed one refactor rename. 2018-01-05 14:24:43 -05:00
Gregor Richards
95bbd914f1 Fixed >2-player issues with multi-input. 2018-01-05 14:24:43 -05:00
Gregor Richards
39243a8d40 Configurable sharing mode. 2018-01-05 14:24:43 -05:00
Gregor Richards
abf045ef0e Made device requests (badly) configurable. 2018-01-05 14:24:43 -05:00
Gregor Richards
fe80c4ce2c Added real pad sharing modes. 2018-01-05 14:24:43 -05:00
Gregor Richards
e4029b72c1 Rename things back after renaming for refactoring. 2018-01-05 14:24:42 -05:00
Gregor Richards
b897ba4e30 Re-fixed input simulation. 2018-01-05 14:24:42 -05:00
Gregor Richards
8c551f3990 Fixing some counters. 2018-01-05 14:24:42 -05:00
Gregor Richards
ed69916e59 First cut of input changes (not yet working) 2018-01-05 14:24:42 -05:00
Gregor Richards
6d4119690d First step (not yet compiling) of changing around Netplay input. 2018-01-05 14:24:42 -05:00
gblues
6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
Gregor Richards
fb3c35dc9f Handle forwarding of netplay state demotions correctly.
Netplay state demotions, i.e. changes from playing to spectating or
disconnected states, could cause chain disconnections of all other
clients. This was due to a bug in when MODE change messages were sent.
Clients rely on the server sending all messages in its own order, and as
a consequence, the server typically holds messages for retransmission
until they can be retransmitted at the correct time. MODE messages were
not held, so could be sent early. When they were sent early, this caused
other clients to panic and disconnect.

A smaller but much stupider secondary bug was also fixed, in which the
first connection could be dropped due simply to writing connections[0]
instead of connections[i] somewhere.
2017-06-06 21:35:09 -04:00
Gregor Richards
2681352d53 Make sure we flush a netplay pause message, so it isn't forgotten. 2017-05-22 16:27:22 -04:00
radius
1de95c6413 further refinement of the netplay workflow 2017-05-16 00:18:29 -05:00
twinaphex
42ebe7a7ad Merge runloop.c and retroarch.c 2017-05-11 09:11:46 +02:00
twinaphex
ed53be7c81 Move all bool settings 2017-04-28 14:11:34 +02:00
Brad Parker
96650e14ea break early if server frame count is ahead of NOINPUT 2017-02-28 21:46:57 -05:00
Twinaphex
fdbdcfee65 Merge pull request #4691 from GregorR/netplay-slave-mode
Netplay slave mode
2017-02-26 21:49:21 +01:00
Twinaphex
b7b3b2cb5f Try to prevent truckload of warnings on iOS 2017-02-26 10:33:03 +01:00
Gregor Richards
07cfd90dc6 Actually USE the new slave options in config. 2017-02-23 21:49:22 -05:00
Gregor Richards
3ff9a43b7d Spectator and slave mode are rewind-free
This commit makes spectator mode and slave mode in netplay always stay
ahead of the input, thereby avoiding rewinds, which is sort of the
point. This also changes catch-up detection to be a bit less eager, so
that they hopefully don't flap between stalling for server input and
catching up with that input.
2017-02-23 19:05:43 -05:00
Gregor Richards
e70ee045bf Initial implementation of Netplay master/slave mode. 2017-02-22 20:34:17 -05:00
Gregor Richards
972b41f803 Fix race condition in NAT traversal task. 2017-02-20 20:16:53 -05:00
Gregor Richards
5f723d1bda Moving NAT traversal into a task to avoid blocking the UI. 2017-02-20 19:08:31 -05:00
Gregor Richards
4c1abfaa71 Support for reset in netplay
This patch transfers core_reset across netplay. Resets effectively
worked before thanks to check_frames, but this makes resets work even
without check_frames, and in particular should allow resets to force
sync in savestateless cores, bringing them one step closer to actually
being usable by non-experts.
2017-02-15 14:40:37 -05:00
Gregor Richards
1148b8230c Fixes to stateless+input latency. 2017-02-01 22:54:03 -05:00