Commit Graph

59686 Commits

Author SHA1 Message Date
github-actions
c0ed1e3367 Fetch translations from Crowdin 2021-12-24 00:07:38 +00:00
Cthulhu-throwaway
ec97c86756
Attempt to fix UPnP for some Windows devices (#13402)
Yet another attempt at it.
2021-12-23 23:52:01 +01:00
Cthulhu-throwaway
c6369b7861
MSVC 2005 Build Fix (#13401) 2021-12-23 22:08:13 +01:00
Cthulhu-throwaway
c4049b9597
NAT and netplay Fixes (#13400)
* NAT and netplay Fixes

Fix a crash when announcing your room to the internet without being in a tunnel.

Fix improper interface for UPnP for some Windows devices.

* Final edits
2021-12-23 21:28:30 +01:00
Jamiras
e0ad9f7e26
fix netplay UPNP binding for specific router behavior (#13399)
* fix netplay UPNP binding for specific router behavior

* use ISSPACE macro
2021-12-23 19:30:35 +01:00
Cthulhu-throwaway
c752f9b0de
Custom relay server support (#13395)
* Custom relay server support

Add support for custom user-ran relay servers.

* snprintf NULL fix
2021-12-23 13:54:52 +01:00
github-actions
f6291adf01 Fetch translations from Crowdin 2021-12-23 00:07:28 +00:00
Cthulhu-throwaway
b9041995f0
Add asian relay server (#13393)
Replace the canadian server with an asian one.
2021-12-22 16:33:41 +01:00
tunip3
fb6bf6023a
Move roms copied to localstate to a dedicated dir and clear on start up [XBOX/UWP] (#13392)
* make roms copy to a specific cache dir in the localstate folder when its copied

* auto delete vfs cache dir on start up

Co-authored-by: Tunip3 <tunip3@users.noreply.github.com>
2021-12-22 12:55:33 +01:00
Cthulhu-throwaway
eff6f41a38
Netplay protocol macro (#13391)
Wrap protocol checks inside of a guard macro.
2021-12-22 03:05:35 +01:00
MajorPainTheCactus
9151326b73
Added support for HDR shaders - if we detect a shader that uses SLANG_FORMAT_A2B10G10R10_UNORM_PACK32 or SLANG_FORMAT_R16G16B16A16_SFLOAT as the format for the last render target in the shader chain AND hdr is switched on then this disables the internal HDR shader and allows the shader chain to define an inverse tonemapper and hdr10 shader. The first use of this is for my hdr shader crt\crt-sony-pvm-4k-hdr.slangp - submitted seperately (#13390) 2021-12-22 02:17:17 +01:00
github-actions
b21f3964b6 Fetch translations from Crowdin 2021-12-22 00:07:46 +00:00
Tony
9da43ad34e
(RGUI) Add Finnish to supported languages (#13389) 2021-12-21 21:15:26 +01:00
Jamiras
7ad71a4a05
fix memory map conversion (#13386) 2021-12-21 21:15:03 +01:00
twinaphex
07534e4a6d Fix relative path includes 2021-12-21 19:56:00 +01:00
Jamiras
3d84a9960e
(cheevos) check netplay status when unlocking achievements (#13379)
* check netplay status when unlocking achievements instead of permanently disabling them in spectate mode

* fix c89 build

* add RARCH_NETPLAY_CTL_IS_SPECTATING
2021-12-21 15:58:42 +01: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
Manuel Alfayate Corchete
e5215d9e29
Fix incorrect file names for remap files when the content path doesn't have a preceding slash. (#13385) 2021-12-20 23:24:19 +01:00
Cthulhu-throwaway
77e202fbf7 Base64 cleanup
Base64 header cleanup.
2021-12-20 14:54:41 +01:00
Cthulhu-throwaway
568a30380b Buildfix for some platforms
Buildfix for some platforms that do not have HAVE_TRANSLATE defined aswell as platforms that define sockaddr_storage as sockaddr/sockaddr_in.
2021-12-20 14:26:50 +01:00
Cthulhu-throwaway
cae793e39f
Update netplay readme (#13380)
Fixes typos, removes outdated info and adds new commands for protocol 6.
2021-12-20 14:15:52 +01:00
github-actions
58b306d651 Fetch translations from Crowdin 2021-12-20 00:08:24 +00:00
Cthulhu-throwaway
cda66d09c3
Netplay Stuff - Addendum (#13378)
Prevents long-term pausing from clients dishonoring allow pausing.

Missing crediting.
2021-12-19 20:43:59 +01: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
arpruss
e5e6f343ac
convert abs mouse from screen to viewport coordinates; fix relative m… (#13258)
* convert abs mouse from screen to viewport coordinates; fix relative mouse code to work in screen mode

* C89 compatibility

* revert accidental include
2021-12-18 17:52:27 +01:00
Tony
698ab4729a
Vulkan max swapchain images option adjustments (#13374) 2021-12-18 17:45:32 +01: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
Tony
6ee92d8583
Stop logging fps statistics twice on quit (#13369) 2021-12-17 16:06:15 +01:00
Tony
2c7d2bcc18
Log font rendering backend only once (#13371) 2021-12-17 16:05:32 +01:00
tunip3
6c123dd078
Mitigate need for vfs cores on ntfs drives [UWP/XBOX] (#13368)
* make check for standard io by access rather than the just assuming based on path string

* add code to auto permissions so files can be accessed by non vfs cores
(no exfat or fat32 support yet)

* remove commit from macro because apparently it causes issues

Co-authored-by: Tunip3 <tunip3@users.noreply.github.com>
2021-12-17 13:46:04 +01:00
Jamiras
cd50a51f3e
support for hashing buffered NDS ROMs (#13365) 2021-12-17 05:42:29 +01:00
Nikos Chantziaras
45f2f74d45
Add gamemode_enable to skeleton retroarch.cfg (#13366) 2021-12-17 05:42:13 +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
Francisco Javier Trujillo Mata
1cd0938cc3
[PS2] Improve Compilation (#13359)
* Allow parallel compilation in PS2

* Allow to compile with griffin or common compilation in PS2

* Enable dummy core to be used in other platforms

* Use threads in YML config

* Add the compilation to PS2 in GitHub Actions
2021-12-15 19:01:56 +01: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
Tilman M. Jaeschke
fd8aa7a9cc
change vscode settings to add a ruler at width 80 (#13358) 2021-12-14 14:07:25 +01:00
vaguerant
34892555ec
Fix rotation on 3DS and Wii U (#13353)
* Fix rotation on 3DS
* Fix rotation on Wii U
2021-12-14 13:43:48 +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
tunip3
62528a483f
Fix roms over 4gb (approx) failing to load, improve copy times, fix scanning for playlists [UWP/XBOX] (#13348)
* Fix scanning for playlists

* Fix issues where games over 4gb (approx) would fail to load and also speed up loading times
2021-12-12 17:29:57 +01:00
github-actions
6870f0114e Fetch translations from Crowdin 2021-12-11 00:06:59 +00:00