* * Use flags for rarch_state
* Get rid of ^M linebreaks in retroarch_types.h
* Buildfixes for consoles
* (audio driver) use flags instead of bools
* (video) Use flags instead of bools
* Rewrite input driver state bools into flags
as deprecated.
* Use fill_pathname_join_special in the vast majority of cases where
we can ensure out_path is a new empty string
* Get rid of some extension concatenation with strlcat where encountered
* Some general cleanups with NULL termination of strings that get immediately
passed to strlcpy/strlcpy-adjacent functions
`llvm-11` changed the default from `-fcommon` to `-fno-common`:
https://reviews.llvm.org/D75056
As a result build fails as:
LD retroarch
duplicate symbol '_apple_platform' in:
obj-unix/release/ui/drivers/ui_cocoa.o
obj-unix/release/ui/drivers/cocoa/cocoa_common.o
duplicate symbol '_apple_platform' in:
obj-unix/release/ui/drivers/ui_cocoa.o
obj-unix/release/gfx/drivers_context/cocoa_gl_ctx.o
ld: 2 duplicate symbols for architecture x86_64
The change moves `apple_platform` definition from `apple_platform.h`
to `cocoa_common.m` leaving only declaration in `apple_platform.h`.
Stateless mode is nonfunctional at the moment, despite my attempts to get it working.
A significant amount of work is required to get it working.
For now, force-disable stateless mode and hide it from menus and the CLI's help text.
* 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>
* Support for Swift, added emulator keyboard
* fixed toggle key handling using magic number hack for now
* fixed keyboard transparency slider for now with suboptimal fix; add gesture recognizer to hide/show keyboard
* Support CocoaView extensions in Swift; move keyboard delegate impl and setup to swift extension
* moved keyboard view model creation out of EmulatorKeyboard
* implement key pressed delegate in swift extension
* added input method for directly sending RETROK_* codes to support a touchscreen keyboard; assign keyboard model delegates; updated keyboard layout (added F1-F12 keys); change shift, control and alt keys to be modifiers
* enable focus mode when custom keyboard is shown; enable/disable overlay when custom keyboard is toggled
* Specify -DHAVE_OPENGLES2 instead of -DHAVE_OPENGLES3 since glsym_es3.h does not compile in iOS 14.5
Fix tvOS build using compiler flags
* Create new project for iOS 13 deploy target; add check for deploy target to conditionally compile for new iOS 13 specific feature (custom keyboard)
* force disable core info caching for iOS, use opengl es2 for debug
* Add flag for iOS custom keyboard - 3-finger swipe up to show, 3-finger swipe down to hide
* use OpenGLES2 instead; using ES3 results in compile time errors on iOS 14.5
* code cleanup
* Updated references to -DDONT_WANT_ARM_ASM_OPTIMIZATIONS flag
* Add JIT support for non-jailbroken devices
* iOS: Add support for touch mouse handler
* Added a HAVE_IOS_TOUCHMOUSE preprocessor macro so that it builds under the iOS11_Metal xcode project
* Changed click-and-drag behavior to double tap hold and drag
* Visual improvements to the emulator keyboard: updated colors, improved key-press effect
* 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.
* 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
* 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.
* Move ui_companion_driver code out of retroarch.c
* Buildfix
* Fix error - was reading the array out of (preinitialized) bounds
* Remove unused variable
* Add HDR support
* Attempt to fix Mingw build and Metal builds
* (D3D12) Fix relative header includes
* Add missing hdr_sm5.hlsl.h
* (d3d12_common.c) Some C89 build fixes
* Fix MSVC build
* - Attempt to fix build on mingw/msys unix with dirty hack
- Fix shader compilation of hdr_sm5.hlsl.h on MSVC/Visual Studio -
the define was seen as an error and was causing the first pipeline
to error out
- Make sure we manually set handle of backBuffer to NULL
* Moving the release of the texture above the freeing of desc.srv_heap
and desc.rtv_heap solves the hard crashes on teardown/setup in RA -
it was crashing hard in d3d12_release_texture before
* Add HAVE_D3D12_HDR ifdef - needs to be disabled for WinRT for now
because of several things that are Windows desktop-specific right now
(GetWindowRect)
* Add dirty GUID hack - should work for both mingw/msys on Windows/Linux
as well as MSVC/Visual Studio (hopefully)
* Change HAVE_D3D12_HDR to HAVE_DXGI_HDR
* Move away from camelcase named variables
* Fix RARCH_ERR logs - they need a newline at the end
* d3d12_check_display_hdr_support - make it return a bool on return
and set d3d12->hdr.support and d3d12->hdr.enable outside of the
function
* (DXGI) Remove D3D12 dependencies from dxgi_check_display_hdr_support and
move it to dxgi_common.c instead
* (DXGI) move d3d12_swapchain_color_space over to dxgi_common.c and
rename it dxgi_swapchain_color_space
* (DXGI) move d3d12_set_hdr_metadata to dxgi_common.c and
rename it dxgi_set_hdr_metadata
* (DXGI) dxgi_check_display_hdr_support - better error handling?
* Fix typo
* Remove video_force_resolution
* (D3D12) Address TODO/FIXME
* (D3D12) Backport
c1b6c0bff2
- Fixed resource transition for present when HDR is off
Fixed cel shader displaying all black as blending was enabled when the hdr shader was being applied - turned off blending during this shader
* Move d3d12_hdr_uniform_t to dxgi_common.h and
rename it dxgi_hdr_uniform_t
* (D3D11) Add HDR support
* Add TODO/FIXME notes
* Cache hdr_enable in video_frame_info_t
* Update comment
* (Metal/WindowListener) Fix duplicate symbol errors by
moving implementation of WindowListener to cocoa_common.m
* (Apple) Cleanup some conditionals
* (Cocoa) Cut down on OSX ifdefs in Cocoa-specific code
* (QB) Add rule for Metal - define HAVE_COCOA_METAL for now
when building for Metal, and HAVE_COCOA for non-Metal build
* Make necessary changes to Makefile.common and qb/config.libs.sh:
- Disable OpenGL for now for Metal build
- Take Metal conditional out of OpenGL block in Makefile.common
* (Metal) Header fixes for compiling without Xcode/Griffin
* (Mac) Some buildfixes for non-Xcode building
* (cocoa_common.h) Restructure to no longer use -DOSX
* (Apple) More buildfixes
* (Apple) Cleanups
since Clang. PowerPC Mac is stuck with GCC and predates the use of ARC,
__has_feature() also is a Clang extension, so wrap around this with a
conditional so that GCC PowerPC on Mac can still work
rarch.rc: Add accelerators for Open (Ctrl+O) and Fullscreen (Alt+Enter)
ui_win32_resource.h: Add accelerator resource ID definition
win32_common.c: Load accelerators, Localize Win32 menu items to current language, and display shortcut keys
Partial update to work with shaders directly
More Edits
More changes
more shader fixes
More Fixes Compiling, reference load still wrong
Added Feedback & things are working
Logging Fixes
Log Fix
More Fixes
Added Feedback Logging
Fixes for file pathing in Linux
Fix GLCore and Crash in QT Saving
Code Cleanup
Removed Unused Function filepath.c
Code Cleanup