Commit Graph

1385 Commits

Author SHA1 Message Date
LibretroAdmin
d0b3c1742d (Video) use flags for FBO passes, GL2 renderchain, etc 2022-10-26 21:21:21 +02:00
LibretroAdmin
46c2a9b950 (Cocoa) small style nits; don't use NSLog 2022-10-26 17:36:58 +02:00
LibretroAdmin
299875f8b6 (Qt) Cleanups 2022-10-25 18:12:19 +02:00
LibretroAdmin
069de60efc (Qt) Remove SSL/TLS check at startup 2022-10-25 15:42:29 +02:00
LibretroAdmin
18ea6fa81e Turn more boolean variables into flags for runloop
- Get rid of RARCH_CTL_IS_INITED, use runloop_get_flags instead
2022-10-24 18:16:00 +02:00
LibretroAdmin
da68e73f94 Get rid of some RARCH_CTL_ commands 2022-10-10 20:14:54 +02:00
LibretroAdmin
d100e73780 Use more runloop flags 2022-10-10 08:59:27 +02:00
Bernhard Schelling
c9bbe7683f
Add View feature (#14467)
* Add View feature
Add saving of a filter set in the Explore menu into a so called "View" file which then gets listed alongside playlists.
This also adds the ability to filter a category by range in the Explore menu and not just filter on exact matches.

* Menu improvements for explore and views

* Collapse ozone sidebar in view

* Fix problems with the sidebar in explore/view

* Ignore view files in the Qt playlists menu

* Add missing semicolon

* Support downloading thumbnails in views
2022-10-10 06:36:02 +02:00
LibretroAdmin
479e3b23d9 Turn content_get_status into content_get_flags 2022-10-09 20:32:39 +02:00
LibretroAdmin
fcbd72dbf3
Use flags pt4 (#14497)
* * 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
2022-10-08 10:39:15 +02:00
LibretroAdmin
0a8ff5d15d (menu_setting) enforce_minrange and enforce_maxrange become flags,
and make remainder of minrange/maxrange local variables of type
float
2022-10-03 02:28:12 +02:00
LibretroAdmin
ace21d28f7 Fix C++ comments 2022-10-01 17:56:16 +02:00
LibretroAdmin
84868ab21f (Setting) Windowed scale should be an integer instead of float 2022-09-05 04:03:04 +02:00
LibretroAdmin
8776c79a60 Fix 'inconsistent instance variable specification' error for OSX 10.5 / Xcode 3.1.4 2022-08-24 11:46:02 +02:00
23rd
9663e4b4f1
Fixed items of system top menu bar on macOS. (#14288)
The second attempt.
This reverts commit e1caf32817.
2022-08-24 03:57:43 +02:00
LibretroAdmin
e769436876 (word wrap functions in stdstring.c) Avoid implicit strlens, caller
should pass the 'length' to the function instead
2022-08-23 17:06:01 +02:00
Cthulhu-throwaway
908667d97a
(Netplay) Removal of older unused code (#14312) 2022-08-11 23:17:33 +02:00
LibretroAdmin
e1caf32817
Revert "Fixed items of system top menu bar on macOS. (#14271)" (#14279)
This reverts commit 7068eebe0c.
2022-08-04 17:56:26 +02:00
23rd
7068eebe0c
Fixed items of system top menu bar on macOS. (#14271) 2022-08-04 15:47:30 +02:00
LibretroAdmin
b2634ea588 * Create fill_pathname_join_special - and specify fill_pathname_join
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
2022-08-04 14:19:38 +02:00
LibretroAdmin
e7f3432e48 Replace some trivial strlcat usage - use return value of preceding
strlcpy then simply append the extension to it at this location
2022-08-04 03:45:09 +02:00
Sergei Trofimovich
f5ee9e74ba
ui/drivers/cocoa: fix -fno-common build (#14204)
`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`.
2022-07-23 10:24:46 +02:00
libretroadmin
547c88259d (Qt) Replace some unnecessary pow usage 2022-07-07 09:27:16 +02:00
Cthulhu-throwaway
b55fa28896
(Netplay/Menu) Localize relay servers (#14136) 2022-07-03 13:45:13 +02:00
sonninnos
a0bfdcce3b
(D3D11/12) Make waitable swapchains optional (#14074) 2022-06-19 21:25:37 +02:00
libretroadmin
e3a716d06a (Qt) Use new URL for scraping thumbnails 2022-06-17 19:10:29 +02:00
sonninnos
0bb65fb39c (D3D11/12) Add waitable swapchains and max frame latency option 2022-06-07 00:25:03 +03:00
libretroadmin
2a747ada5d (GCC 12) Silence some new warnings generated 2022-06-04 06:35:05 +02:00
Tatsuya79
581ebcc0ac
QT: add recent new options in video settings 2022-05-18 16:35:00 +02:00
Cthulhu-throwaway
0a52964015
(Netplay) Disable and hide stateless mode (#13915)
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.
2022-05-05 20:46:48 +02:00
Autechre
1493533345
Revert "ensure history list will contain crc32 (#13883)" (#13891)
This reverts commit 141bba0464.
2022-04-26 14:22:33 +02:00
Alexander Trufanov
141bba0464
ensure history list will contain crc32 (#13883) 2022-04-25 15:53:23 +02:00
twinaphex
3336e61859 (Qt) Combine Qt header files 2022-04-22 08:26:27 +02:00
twinaphex
95fad4d32c Cleanups 2022-04-13 15:08:22 +02:00
yoshisuga
01cb10d8b3
[iOS 13+] Support a toolbar that allows toggling of onscreen keyboard and touch mouse (#13700)
* 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>
2022-03-07 19:09:49 +01:00
yoshisuga
bc02f8319e
[iOS] New iOS 13 project to support Swift; Custom keyboard and touch mouse support (#13435)
* 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
2022-02-22 08:21:34 +01:00
jdgleaver
412c79862c
(Qt) Fix crash when loading content via desktop menu while content is already running (#13595) 2022-02-05 00:26:10 +01:00
Vladimir Serbinenko
4e24fb3d01
Add osx-ppc compilation for frontend (#13532)
* 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.
2022-01-24 16:22:07 +01:00
Tony
7ca3c314f8
Move 'Black Frame Insertion' under 'Synchronization' (#13457) 2022-01-07 17:30:21 +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
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
Tony
71836c1055
Add option for showing notifications only in menu (#13326) 2021-12-16 14:38:43 +01:00
Autechre
b6695d8921
Netplay changes proposed for 1.9.14 (#13314)
* 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.
2021-12-04 02:34:21 +01:00
Autechre
113e9340c1
Move ui_companion_driver code out of retroarch.c (#13268)
* Move ui_companion_driver code out of retroarch.c

* Buildfix

* Fix error - was reading the array out of (preinitialized) bounds

* Remove unused variable
2021-11-21 23:19:23 +01:00
twinaphex
2a5751ca0e Get rid of some getters 2021-11-09 07:06:04 +01:00
twinaphex
0b16a64d40 Remove unused variables 2021-11-05 22:42:09 +01:00
twinaphex
7f33a03423 Revert "Revert "Backport netplay changes from forum member""
This reverts commit 38a6b9f086.
2021-11-05 18:52:56 +01:00
twinaphex
38a6b9f086 Revert "Backport netplay changes from forum member"
This reverts commit 367ac6ce46.
2021-11-05 18:34:52 +01:00
twinaphex
367ac6ce46 Backport netplay changes from forum member 2021-11-05 17:17:10 +01:00
twinaphex
18412e34c1 Some CXX_BUILD buildfixes for Mac 2021-11-05 02:16:40 +01:00