Commit Graph

2494 Commits

Author SHA1 Message Date
github-actions
b21f3964b6 Fetch translations from Crowdin 2021-12-22 00:07:46 +00:00
Cthulhu-throwaway
966335e367
Smaller Netplay Changes (#13387)
Lobby Viewer: Filter out rooms that are not running RetroArch
Lobby Viewer: Display a non-connectable tag to non-connectable rooms.
Host: Display warning if we are announcing to the internet but our room isn't connectable from there.
2021-12-21 15:58:25 +01:00
github-actions
3f7d279acf Fetch translations from Crowdin 2021-12-21 00:08:24 +00:00
Nikos Chantziaras
0357b6c922
Add on-screen statistics toggle hotkey (#13381)
* Add on-screen statistics toggle hotkey

* CHANGES.md: Add technical statistics hotkey
2021-12-21 00:03:35 +01:00
github-actions
58b306d651 Fetch translations from Crowdin 2021-12-20 00:08:24 +00:00
Cthulhu-throwaway
690c802921
Netplay Stuff (#13375)
* Netplay Stuff

## PROTOCOL FALLBACK
In order to support older clients a protocol fallback system was introduced.
The host will no longer send its header automatically after a TCP connection is established, instead, it awaits for the client to send his before determining which protocol this connection is going to operate on.
Netplay has now two protocols, a low protocol and a high protocol; the low protocol is the minimum protocol it supports, while the high protocol is the highest protocol it can operate on.
To fully support older clients, a hack was necessary: sending the high protocol in the unused client's header salt field, while keeping the protocol field to the low protocol. Without this hack we would only be able to support older clients if a newer client was the host.
Any future system can make use of this system by checking connection->netplay_protocol, which is available for both the client and host.

## NETPLAY CHAT
Starting with protocol 6, netplay chat is available through the new NETPLAY_CMD_PLAYER_CHAT command.
Limitations of the command code, which causes a disconnection on unknown commands, makes this system not possible on protocol 5.
Protocol 5 connections can neither send nor receive chat, but other netplay operations are unaffected.
Clients send chat as a string to the server, and it's the server's sole responsability to relay chat messages.
As of now, sending chat uses RetroArch's input menu, while the display of on-screen chat uses a widget overlay and RetroArch's notifications as a fallback.
If a new overlay and/or input system is desired, no backwards compatibility changes need to be made.
Only clients in playing mode (as opposed to spectating mode) can send and receive chat.

## SETTINGS SHARING
Some settings are better used when both host and clients share the same configuration.
As of protocol 6, the following settings will be shared from host to clients (without altering a client's configuration file): input latency frames and allow pausing.

## NETPLAY TUNNEL/MITM
With the current MITM system being defunct (at least as of 1.9.X), a new system was in order to solve most if not all of the problems with the current system.
This new system uses a tunneling approach, which is similar to most VPN and tunneling services around.

Tunnel commands:
RATS[unique id] (RetroArch Tunnel Session) - 16 bytes -> When this command is sent with a zeroed unique id, the tunnel server interprets this as a netplay host wanting to create a new session, in this case, the same command is returned to the host, but now with its unique session id. When a client needs to connect to a host, this command is sent with the unique session id of the host, causing the tunnel server to send a RATL command to the host.
RATL[unique id] (RetroArch Tunnel Link) - 16 bytes -> The tunnel server sends this command to the host when a client wants to connect to the host. Once the host receives this command, it establishes a new connection to the tunnel server, sending this command together with the client's unique id through this new connection, causing the tunnel server to link this connection to the connection of the client.
RATP (RetroArch Tunnel Ping) - 4 bytes -> The tunnel server sends this command to verify that the host, whom the session belongs to, is still around. The host replies with the same command. A session is closed if the tunnel server can not verify that the host is alive.

Operations:
Host -> Instead of listening and accepting connections, it connects to the tunnel server, requests a new session and then monitor this connection for new linking requests. Once a request is received, it establishes a new connection to the tunnel server for linking with a client. The tunnel server's address and port are obtained by querying the lobby server. The host will publish its session id together with the rest of its info to the lobby server.
Client -> It connects to the tunnel server and then sends the session id of the host it wants to connect to. A host's session id is obtained from the json data sent by the lobby server.

Improvements (from current MITM system):
No longer a risk of TCP port exhaustion; we only use one port now at the tunnel server.
Very little cpu usage. About 95% net I/O bound now.
Future backwards compatible with any and all changes to netplay as it no longer runs any netplay logic at MITM servers.
No longer operates the host in client mode, which was a source of many of the current problems.
Cleaner and more maintainable system and code.

Notable functions:
netplay_mitm_query -> Grabs the tunnel's address and port from the lobby server.
init_tcp_socket -> Handles the creation and operation mode of the TCP socket based on whether it's host, host+MITM or client.
handle_mitm_connection -> Creates and completes linking connections and replies to ping commands (only 1 of each per call to not affect performance).

## MISC
Ping Limiter: If a client's estimated latency to the server is higher than this value, connection will be dropped just before finishing the netplay handshake.
Ping Counter: A ping counter (similar to the FPS one) can be shown in the bottom right corner of the screen, if you are connected to a host.
LAN Discovery: Refactored and moved to its own "Refresh Netplay LAN List" button.

## FIXES
Many minor fixes to the current netplay implementation are also included.

* Remove NETPLAY_TEST_BUILD
2021-12-19 16:58:01 +01:00
github-actions
b7c14f61bc Fetch translations from Crowdin 2021-12-19 00:08:38 +00:00
github-actions
7049c6c204 Fetch translations from Crowdin 2021-12-18 00:07:30 +00:00
Tony
8cc423e036
Logging cleanups (#13370) 2021-12-17 18:04:24 +01:00
github-actions
4fa4260a16 Fetch translations from Crowdin 2021-12-17 00:07:15 +00:00
Tony
71836c1055
Add option for showing notifications only in menu (#13326) 2021-12-16 14:38:43 +01:00
github-actions
aea8dad1ae Fetch translations from Crowdin 2021-12-16 00:07:19 +00:00
jdgleaver
688c652673
[GameMode] Improve error handling (#13362) 2021-12-15 19:01:39 +01:00
github-actions
1582856b43 Fetch translations from Crowdin 2021-12-15 00:07:44 +00:00
Tilman M. Jaeschke
682bbab233
[New Feature] Load save states from command-line or playlist (#13354)
* load save states from command-line or playlist

* load save states from command-line or playlist

* removed some brackets
2021-12-14 14:08:06 +01:00
Nikos Chantziaras
430baf7c21
Add Linux GameMode support (#13339)
This can fix a lot of performance issues, like audio crackling and frame
time spikes. This requires the GameMode package to be installed. See:

https://github.com/FeralInteractive/gamemode

This commit adds a "Game Mode" bool option to the "Power
Management" and "Latency" settings sections, and it can be toggled
on/off without restarting RA.

The actual toggling of game mode happens in a new frontend platform
interface function. Perhaps this will become useful for other platforms
that provide some equivalent of Linux GameMode.

Since the GameMode ABI is fixed, and the API comes as a single,
header-only file with no actual deps, we simply bundle the header
(deps/feralgamemode/gamemode_client.h.) That way, all Linux builds will
have support for GameMode regardless of whether the GameMode development
package is installed or not.
2021-12-14 14:07:42 +01:00
github-actions
98431a15c0 Fetch translations from Crowdin 2021-12-14 00:07:35 +00:00
github-actions
dd278dc068 Fetch translations from Crowdin 2021-12-13 00:07:31 +00:00
github-actions
6870f0114e Fetch translations from Crowdin 2021-12-11 00:06:59 +00:00
github-actions
cb8a589b77 Fetch translations from Crowdin 2021-12-10 00:09:35 +00:00
github-actions
39074fa55c Fetch translations from Crowdin 2021-12-09 00:07:36 +00:00
github-actions
b078d52689 Fetch translations from Crowdin 2021-12-07 00:07:37 +00:00
github-actions
e954a46b1b Fetch translations from Crowdin 2021-12-06 00:07:29 +00:00
github-actions
9f01ebf0a9 Fetch translations from Crowdin 2021-12-05 00:07:43 +00:00
Tony
09880e92d2
Logging cleanups (#13320) 2021-12-04 14:21:12 +01:00
Autechre
b6695d8921
Netplay changes proposed for 1.9.14 (#13314)
* Added setting to allow/disallow players other than the host from pausing the game.
* Added a sublabel for netplay max connections.
* Fixed port override macro from not being set immediately after the port setting.
* Fixed memory leaks.
2021-12-04 02:34:21 +01:00
github-actions
69e4ea8d33 Fetch translations from Crowdin 2021-12-04 00:06:41 +00:00
github-actions
4a39630c0f Fetch translations from Crowdin 2021-12-03 00:07:30 +00:00
github-actions
72e49d82d6 Fetch translations from Crowdin 2021-12-02 00:07:57 +00:00
github-actions
621c3a7b7e Fetch translations from Crowdin 2021-12-01 00:08:06 +00:00
Autechre
af4bdecef9
Show passworded rooms on lobby (#13301) 2021-11-30 22:06:13 +01:00
github-actions
a585e05a8a Fetch translations from Crowdin 2021-11-30 00:07:17 +00:00
github-actions
ef8a14a968 Fetch translations from Crowdin 2021-11-29 00:07:04 +00:00
github-actions
05f95ad428 Fetch translations from Crowdin 2021-11-28 00:08:27 +00:00
github-actions
454fddb1dc Fetch translations from Crowdin 2021-11-27 00:07:02 +00:00
github-actions
019466e928 Fetch translations from Crowdin 2021-11-26 00:07:25 +00:00
github-actions
5069acd288 Fetch translations from Crowdin 2021-11-25 00:06:52 +00:00
github-actions
1077a6f3a8 Fetch translations from Crowdin 2021-11-24 00:07:14 +00:00
github-actions
d02d32fbe4 Fetch translations from Crowdin 2021-11-23 00:07:15 +00:00
github-actions
8dfaf84cc9 Fetch translations from Crowdin 2021-11-22 00:07:09 +00:00
github-actions
2f9a8d7b3e Fetch translations from Crowdin 2021-11-21 00:07:13 +00:00
Autechre
9e40966dce
Merge pull request #13249 from ToKe79/lakka2upstream
Upstream patches from Lakka
2021-11-20 22:07:47 +01:00
github-actions
955bf08fcd Fetch translations from Crowdin 2021-11-20 00:06:32 +00:00
github-actions
4ffe9dc5b3 Fetch translations from Crowdin 2021-11-19 00:07:09 +00:00
github-actions
17c522bbb0 Fetch translations from Crowdin 2021-11-18 00:08:22 +00:00
Tomáš Kelemen (vudiq)
efad7a7dcc
Lakka: CD-ROM eject menu item
Adds new entry (where the entry for dumping CD is) to eject the disc -
in case the CD drive has no physical button to eject the disc / the
button does not work. Useless for most, but quality of life improvement
for some.

Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-99-eject_disc.patch
2021-11-18 00:36:01 +01:00
Tomáš Kelemen (vudiq)
a2f9273979
Bluetooth: add option to remove pairing
Pressing the START button removes the device pairing. Useful in case
the device (e.g. gamepad) was paired with a different adapter/computer
and needs to be paired again with current adapter/computer.

To pair again, RetroArch needs to be restarted, so the device list is
populated again.

Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-98-remove_bluetooth_pairing.patch
2021-11-17 22:15:35 +01:00
github-actions
15596f953e Fetch translations from Crowdin 2021-11-17 00:06:43 +00:00
github-actions
a410cf1377 Fetch translations from Crowdin 2021-11-16 00:06:32 +00:00
github-actions
7324c0d33b Fetch translations from Crowdin 2021-11-15 00:06:59 +00:00