* (Wayland) Show window early to get screen info
* Report current monitor size on initial get_video_size call
* Fullscreen to monitor selected in settings
* Fullscreen on current monitor when setting is set to automatic
* Fallback to shm_open when memfd_create is not supported
* Fix translations with messed-up string placement
* Fix Hebrew and Persian text display
Hebrew is now displayed properly as right-to-left.
Miscellaneous whitespaces, like the zero width non-joiner used in Persian, no longer break right-to-left texts.
* Report current monitor size on initial get_video_size call
* Fullscreen to monitor selected in settings
* Fullscreen on current monitor when setting is set to automatic
* Fix handling of big-endianness in gl1
* Enable gl1 on osx-ppc
* Force gl1 on apple if gfx supports only gl1
* Backport gl2 apple workaround to gl1
* Fix big-endianness handling in widgets
* Fix old osx condition
Current code assumes that osx < 10.12 is equivalent to ppc osx. It's not
true as Leopard x86 is still < 10.12 but not ppc. As xcode compiles fat
binaries it includes osx x86 and compilation fails.
* Disable crtswitchres when no c++11 is available
Crtswitchres altually needs c++11. Since it's not that important to make
it compatible with lower c++, just disable if no c++11 is available
* Don't use firstObject on old Mac OS X.
It was introduced in 10.6, so on old ones just implement it ourselves
* Compile osx-ppc frontend
* osx-ppc: Build a fat binary
On 10.6 i386 xcode apparently refuses to build a pure ppc.
Settle for a fat binary.
Currently each time a screen resolution or setting change occurs, fbdev_destroy, fbdev_init and fbdev_set_mode are called in sequence, trying to destroy context and surface (though context pointer seems to remain unchanged) and create again both of them.
However it seems something is wrong with egl_destroy, as after the call fps drops from 60 to 33fps in GUI with huge performance impact, at least with libmali.
Philosophy is changed with this commit to avoid destroying and creating context and surface each time (creation only occurs in fbdev_init and egl_destroy is called only if retroarch is shutting down).
As a minor modification, framebuffer is resetted to 0 on retroarch shutdown to avoid any chance of freezed screen effect.
* Fixed crash on boot with xmb and vulkan driver Fixed wrong blend state affecting the ribbon shader Fixed up C++ style comments with C style
* Fixed compilation issue - I made a last minute change and thought I had compiled it but obviously hadn't! No wonder it worked.
-In case yoffset is not set=0 by the driver (which seems to occur randomly on certain configurations), on next set_video_mode call screen freezes and cannot be updated. Condition to set yoffset to 0 if current value is >0 is added as fix.
-If setterm is not available, sh error occurs in the shell on gfx_ctx_mali_fbdev_destroy call. Condition based on setterm availability is added to avoid this.
-If pixclock from driver is not available (=0), divide by 0 occurs when trying to calculate refresh rate. Condition is added as a fix, if pixclock=0 refresh rate is set as 60.
* 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>
* force angle to render at 1080p regardless of screensize as the output is 1080p regardless of screensize.
This fixes an issue where at 4k any angle output would be zoomed into a corner
* set resolution based on display resolution (auto 4k)
* set driver to d3d11 if booting with opengl
* reset width and height of output on boot to match display
Co-authored-by: Tunip3 <tunip3@users.noreply.github.com>
* 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
* 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
The emulating mailbox infrastructure is very hacky and needs a rethink
to be able to properly support screenshots. emulating mailbox is pretty
nasty to begin with and should be considered a hack.