Commit Graph

1373 Commits

Author SHA1 Message Date
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
twinaphex
cfb2ae7d2c need to use SetWindowText for LEGACY_WIN32 2021-10-12 12:41:05 +02:00
twinaphex
849ed7fc3d Buildfix for MSVC 2021-10-12 11:58:22 +02:00
Soar Qin
290bc214e3
win32: fix broken win9x builds caused by #13089 (#13106)
Co-authored-by: Soar Qin <soarchin@gmial.com>
2021-10-12 11:24:58 +02:00
Soar Qin
39fd4677d9
win32: fix non-ASCII text display in window title (#13089) 2021-10-09 06:28:17 +02:00
twinaphex
49fbed2423 Get rid of input_mouse_grabbed - move retroarch types to
retroarch_types.h
2021-09-30 23:22:50 +02:00
twinaphex
ddceb51f89 Get rid of some needless getters/setters 2021-09-30 21:10:12 +02:00
twinaphex
4c419466e6 Cleanups 2021-09-28 15:19:08 +02:00
twinaphex
e886e908d5 Create consistent naming conventions - use retroarch_ instead
of rarch_ for some functions for all functions coming from retroarch.h
2021-09-28 12:56:10 +02:00
twinaphex
3dee62ce62 Cleanups and buildfix 2021-09-28 01:16:53 +02:00
twinaphex
83ce4259a0 Have only one getter for runloop_state 2021-09-21 19:08:26 +02:00
twinaphex
f21641d898 Get rid of another 'getter' function 2021-09-21 18:30:56 +02:00
Michael Burgardt
d8db234df0
Concatinate some previously truncated strings for easier translation (#12120) 2021-09-16 19:00:14 +02:00