* features_cpu: Fix clock for djgpp
* frontend_dos_set_fork: Fix wrong id names
* dos_input: Fix missing indexing
* dos_joypad: Fix wrong id name
* Fix menu drawing
Menu is already prescaled to VGA_WIDTH x VGA_HEIGHT in vga_menu_frame. We need
to always use those dimensions
* Change dos compilation from griffin to common
* Set vga menu size to 320x200
* Add DOS compilation in gitlab-ci.yml
* Support new elf2dol path in Makefile.griffin
* Fix NULL pointer dereference when no core info is available
* Fix double include of different versions of libogc
* Move ngc and wii to Makefile.common
Resulting binary is 60K *smaller*. This is surprising but probably due to
less inlining happening
* gx_gfx: Fix hang on gfx initialization
* Remove sthread_isself on NGC/Wii
It relies on pthread_equal that is not there for either legacy pthreads
or normal pthreads on those platforms
* Wii networking
* Missing includes in split
* Network fixes
* Fix logging of non-format string as a format
* Support for gx netlogger
* Network fix
* Network fixes
* Network info
* gx: Move config files to app directory
Otherwise it clashes between wiiU and vWii version with unpredictable
effects
* 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
* 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
Consistently with input_config_get_device_name use in
get_string_representation_split_joycon.
Fixes a bug where saved autoconfig would not match the current device, but
an unpredictable other device in the system.
* 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.
* Move ui_companion_driver code out of retroarch.c
* Buildfix
* Fix error - was reading the array out of (preinitialized) bounds
* Remove unused variable
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
* Any pad can control the menu
== DETAILS
I am not sure I've quite got it so that any pad can *open* the
menu, but I do have it so any pad can control it.
- split out the input processing into a separate method
- track down and squish some hairy bugs that boiled down to
bad pointer math
- it looks like `menu_driver.c` has a mix of line endings, so I
ran it through `dos2unix` so it has consistent line endings
again.
- verified that this change did not impact actual cores
* optimize out cumulative_bits
* Incorporate PR feedback
Many thanks to @jdgleaver for providing these optimizations.
* apply one more optimization
* 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
* adjusting text to be one notch brighter, base0 -> base1, base01 -> base0
* adjusting sublabel text to use base00 instead, its in between base01 and base0
* 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
== DETAILS
So, basically this back-and-forth is because we used fixed-size
data types (i.e. `uint32_t`) which maps to different primitive data
types on different platforms. So `uint32_t` might be a `long` on some
platforms (e.g. Wii U), while it's just a plain integer on others (PC).
And the format specifier works off primitive data type, not data type
size.
So, to resolve this, we:
- keep `%lx` as the format specifier
- cast the parameter to printf to unsigned long
This is better than the alternatives that could cause problems trying to
cast a long down to an int.
== DETAILS
These changes fall into a few broad categories:
1. Explicitly undefine things we want to re-define due to conflicts with
the version of devkitpro we're using
2. Clean up hex format specifiers to use `%lx` or `%lX` when working with
long integers
3. Move variables inside the ifdef they're used in to squelch "unused variable"
messages
4. Add parenthesis to make Wii U shader declarations stop complaining
And then there's a weird "misleading indent" warning that I fixed by just
rewriting a block of code to use a switch statement instead of if-then-else.
These changes work fine on Wii U, but we'll need to keep an eye on CI/CD to see
if other platform builds break.
* Fix for warning and fix for incorrect comment
* Fixed contrast to be more correct - now scales from 0-10 linearly and behaves more the way you'd expect it to - changed name to ditch legacy settings users may have
Added ability to skip inverse tonemapper to the shader via the constant buffer using 'inverse_tonemap' - set to 0.0f to skip
Fixed potential bug when swapping between hdr and sdr and the bit depth not being set correctly
Fixed dx11's blend, rasterizer and topology states not being set to the sames when using hdr and leaving the menu - caused issues with PCSX2's Shadow of the Colossus
Added numerous helper functions to help create the correct values to colour the UI - normally the white UI elements should be rendered at paper white not max brightness for various reasons
* Fix stylistic issues - * Don't use camelcase for variables and function names * Use '(void)' for function declarations instead of () in C code * Declare variables at the top of a function or code block * Make sure functions that return a value always have a default return path that is not encapsulated by an else block * Use more unique names for retro_math functions which are less likely to overlap with other libraries' function symbols
Co-authored-by: twinaphex <libretro@gmail.com>
* (Ozone) Take out gfx_display_rotate_z out of ozone_draw_icon -
lots of matrix rotates and multiplies were happening when
just calling it once would suffice
* (MaterialUI) Reduce calls to gfx_display_rotate_z
* (XMB) Cleanup
* (3DS) Add bottom screen menu
-> User can save/load state on botom screen with thumbnail.
-> Call a save_state_to_file() when RAM state has data to write a disk.
-> If the bottom screen needs updating, swap the bottom framebuffers.
Add: SAVE/LODE STATE TO RAM
-> This is useful for devices with slow I/O
-> 3DS bottom save state use CMD_EVENT_SAVE_STATE_TO_RAM
-> 3DS bottom load state use CMD_EVENT_LOAD_STATE when RAM state has no data
-> 3DS bottom load state use CMD_EVENT_LOAD_STATE_FROM_RAM when RAM sate has data
* Rewrite path_get_state to retroarch_get_current_savestate_path
* Fix unterminated state_path
* 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
getter/setter functions - also finally take this opportunity to stop
setting framebuffer width/height/pitch for menu drivers that don't
use a framebuffer texture at all
with latest Xbox Series dashboard; DXGIResizeBuffers passing 0, 0 as
width/height is apparently problematic as it changes 0, 0 to 8,8
instead,
breaking the program
promotion would lead to 'x' being a garbage value, leading to problems
when this value was passed to vkCmdSetViewport. This stops Vulkan
validation layers from complaining about it
* (Switch/libnx) remove dead code
* (Lakka/Switch/libnx) It was a mistake to include
switch_performance_profiles.h inside lakka.h, it was creating warnings
for nearly every file. Instead, it gets optionally included for the
files that need it