* Fetch translations from Crowdin
* Support for showing and hiding indicator and navigation bar
* Refactored to use a view model
* Support defining helper bar items and support showing/hiding keyboard
* reorganized source files into separate logical files
* Moved mouse support to swift (except for delegate implementation), added support for enabling touch mouse in helper bar; reorganized swift source files
* Reorganized keyboard files; added the touch mouse messages to the RA localization files; use the RA notification system
* change keyboard letters to uppercase for clarity
Co-authored-by: github-actions <github-actions@github.com>
* Disable run-ahead based on save state support level defined in core info files
* Disable rewind based on save state support level defined in core info files
* Add option for showing the overlay behind the menu
This commit lays the groundwork for this option. Support for this option
in the video drivers themselves is going to be added in later commits.
* gl1: Add overlay behind menu support
* gl2: Add overlay behind menu support
* gl3: Add overlay behind menu support
* vulkan: Add overlay behind menu support
* ctr: Add overlay behind menu support
* d3d9: Add overlay behind menu support
* d3d10: Add overlay behind menu support
* d3d11: Add overlay behind menu support
* d3d12: Add overlay behind menu support
* CHANGES.md: overlay behind menu
Co-authored-by: MrHuu <MrHuu@users.noreply.github.com>
Co-authored-by: Tony <45124675+sonninnos@users.noreply.github.com>
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.
* 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
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.
* 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.
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
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
* feat: adding solarized dark theme to ozone
* fix: variable not defined in header
* fix: added string for selecting theme in menu
* fix: added message hash for string
* feat: copied solarized dark translations into msg hashes
* fix: forgot to change name of enum label after copying
* first pass of new colors
* added selection border and fixed sublabel color
* sublabel color from blue to muted gray
* trying cyan for sublabel
* adjusted selected text color to match philosophy from solarized website
* testing what the entries_ colors do
* chose colors for entries_, adjusted other border and bgs
* match selection border to sublabel color
* trying gray for sublabel
* accidentally put the color in the wrong place, reverting and updating
* trying to change selected option color to orange
* not feeling orange, lets try teal
* try for orange border
* try for magenta border
* try for violet border
* trying blue border again
* trying omar blue bc why not
* reverting to regular blue for icons and green for border
* try magenta for footer border
* trying font color for footer border
* trying to get message background to show
* can't get it to render, but changed message background to violet
* testing sidebar changes
* sidebar colors
* lighter sidebar color
* trying gray sidebar
* try a gradient
* screwed up one of the coordinates
* reversing gradient
* attempting gradient with colors i made up
* accidentally wrote gradient to dracula instead of solarized dark
* adding gradient to the top, reversing bottom gradient
* randomly trying shuffling bottom gradient coords
* moving top right coordinate somewhere else
* swapped top two bottom coords to see
* swapped them back, i got lucky and things were right
* think i figured out the order, BL, BR, TL, TR
* making background gradient lil darker
* fixed coords
* lessening gradient effect
* lessening gradient effect, but by making darker instead of lighter
* of course, messed up two coords
* removed top and bottom gradients
* dark and flat sidebar
* forgot to change running background
* made running background a bit less transparent since this is a low contrast theme
* added underscore to theme name
* adjusting message background color
* fixing message background color
* fixed cursor color border
* adjusting text to be one notch brighter, base0 -> base1, base01 -> base0
* adjusting sublabel text to use base00 instead, its in between base01 and base0
* added message hashes for light theme name
* added defines and enums for the light theme
* added solarized light structs into ozone.c, theyre all clones of dark for now
* fixing solarized dark ozone theme
fixing name of theme in ozone.c so assets load properly, fixing cursor and message colors to be green instead of purple
* added message hashes for light theme name
* added defines and enums for the light theme
* added solarized light structs into ozone.c, theyre all clones of dark for now
* i had based this branch on the wrong branch, fixed
* first pass, only changing background and regular text
* trying orange and magenta highlights
* Revert "trying orange and magenta highlights"
This reverts commit 1f1e107888cee0e97c6354a8d114863b39af8d00.
* applying the new colors to the right theme this time :)
* trying red instead of pink
* trying magenta icons in a desperate attempt to justify the use of the color
* trying magenta icons, orange labels and selector
* back to orange and red, sigh
* trying sidebar colors
* fixing sidebar gradient
* light theme red animated border colors
* trying magenta for second border color
* that was bad, trying a less light red
* going even darker
* made cursor border get darker instead of lighter
* that was a little too dark
* changed light theme running background to be..light
* feat: adding solarized dark theme to ozone
* fix: variable not defined in header
* fix: added string for selecting theme in menu
* fix: added message hash for string
* feat: copied solarized dark translations into msg hashes
* fix: forgot to change name of enum label after copying
* first pass of new colors
* added selection border and fixed sublabel color
* sublabel color from blue to muted gray
* trying cyan for sublabel
* adjusted selected text color to match philosophy from solarized website
* testing what the entries_ colors do
* chose colors for entries_, adjusted other border and bgs
* match selection border to sublabel color
* trying gray for sublabel
* accidentally put the color in the wrong place, reverting and updating
* trying to change selected option color to orange
* not feeling orange, lets try teal
* try for orange border
* try for magenta border
* try for violet border
* trying blue border again
* trying omar blue bc why not
* reverting to regular blue for icons and green for border
* try magenta for footer border
* trying font color for footer border
* trying to get message background to show
* can't get it to render, but changed message background to violet
* testing sidebar changes
* sidebar colors
* lighter sidebar color
* trying gray sidebar
* try a gradient
* screwed up one of the coordinates
* reversing gradient
* attempting gradient with colors i made up
* accidentally wrote gradient to dracula instead of solarized dark
* adding gradient to the top, reversing bottom gradient
* randomly trying shuffling bottom gradient coords
* moving top right coordinate somewhere else
* swapped top two bottom coords to see
* swapped them back, i got lucky and things were right
* think i figured out the order, BL, BR, TL, TR
* making background gradient lil darker
* fixed coords
* lessening gradient effect
* lessening gradient effect, but by making darker instead of lighter
* of course, messed up two coords
* removed top and bottom gradients
* dark and flat sidebar
* forgot to change running background
* made running background a bit less transparent since this is a low contrast theme
* added underscore to theme name
* adjusting message background color
* fixing message background color
* fixed cursor color border
* adjusting text to be one notch brighter, base0 -> base1, base01 -> base0
* adjusting sublabel text to use base00 instead, its in between base01 and base0
* added message hashes for light theme name
* added defines and enums for the light theme
* added solarized light structs into ozone.c, theyre all clones of dark for now
* fixing solarized dark ozone theme
fixing name of theme in ozone.c so assets load properly, fixing cursor and message colors to be green instead of purple
* added message hashes for light theme name
* added defines and enums for the light theme
* added solarized light structs into ozone.c, theyre all clones of dark for now
* i had based this branch on the wrong branch, fixed
* first pass, only changing background and regular text
* trying orange and magenta highlights
* Revert "trying orange and magenta highlights"
This reverts commit 1f1e107888cee0e97c6354a8d114863b39af8d00.
* applying the new colors to the right theme this time :)
* trying red instead of pink
* trying magenta icons in a desperate attempt to justify the use of the color
* trying magenta icons, orange labels and selector
* back to orange and red, sigh
* trying sidebar colors
* fixing sidebar gradient
* light theme red animated border colors
* trying magenta for second border color
* that was bad, trying a less light red
* going even darker
* made cursor border get darker instead of lighter
* that was a little too dark
* changed light theme running background to be..light
* feat: adding solarized dark theme to ozone
* fix: variable not defined in header
* fix: added string for selecting theme in menu
* fix: added message hash for string
* feat: copied solarized dark translations into msg hashes
* fix: forgot to change name of enum label after copying
* first pass of new colors
* added selection border and fixed sublabel color
* sublabel color from blue to muted gray
* trying cyan for sublabel
* adjusted selected text color to match philosophy from solarized website
* testing what the entries_ colors do
* chose colors for entries_, adjusted other border and bgs
* match selection border to sublabel color
* trying gray for sublabel
* accidentally put the color in the wrong place, reverting and updating
* trying to change selected option color to orange
* not feeling orange, lets try teal
* try for orange border
* try for magenta border
* try for violet border
* trying blue border again
* trying omar blue bc why not
* reverting to regular blue for icons and green for border
* try magenta for footer border
* trying font color for footer border
* trying to get message background to show
* can't get it to render, but changed message background to violet
* testing sidebar changes
* sidebar colors
* lighter sidebar color
* trying gray sidebar
* try a gradient
* screwed up one of the coordinates
* reversing gradient
* attempting gradient with colors i made up
* accidentally wrote gradient to dracula instead of solarized dark
* adding gradient to the top, reversing bottom gradient
* randomly trying shuffling bottom gradient coords
* moving top right coordinate somewhere else
* swapped top two bottom coords to see
* swapped them back, i got lucky and things were right
* think i figured out the order, BL, BR, TL, TR
* making background gradient lil darker
* fixed coords
* lessening gradient effect
* lessening gradient effect, but by making darker instead of lighter
* of course, messed up two coords
* removed top and bottom gradients
* dark and flat sidebar
* forgot to change running background
* made running background a bit less transparent since this is a low contrast theme