1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00
Commit Graph

4070 Commits

Author SHA1 Message Date
Colin Kinloch
d95bc2dd54 (Wayland) Dynamically load libdecor at runtime 2022-03-22 06:58:41 +01:00
Colin Kinloch
47c850c7fd (Wayland) Dedupe VK/GL code 2022-03-21 07:50:34 +01:00
Colin Kinloch
82c69995f0 (Wayland) SHM anti-collision for the splash screen 2022-03-20 18:31:30 +01:00
Colin Kinloch
065fb5acee (Wayland) Skip splash screen if window is not ready 2022-03-18 16:29:49 +01:00
jdgleaver
ea77410037 Add 'Manage Remap Files' submenu + automatically save input remaps when closing content 2022-03-16 18:59:49 +01:00
revvv
492a83e6d5 Wii: Fix find_connection_entry(): needs unsigned int
Otherwise the USB gamepad cannot be found, if VID/PID has leading zero.
For example: Retrode gamepad adapter:
             vid=1027 (0x403) pid=38849      (0x97c1) becomes
             vid=1027 (0x403) pid=-26687 (0xffff97c1)
2022-03-15 17:43:46 +01:00
jdgleaver
b08314cf60 Prevent 'global' configuration of input libretro device type 2022-03-15 17:43:28 +01:00
Colin Kinloch
86ca2006ea
(Wayland) Fallback to shm_open when memfd_create fails (#13740) 2022-03-14 19:20:29 +01:00
Nikos Chantziaras
b094c58081
Add hotkey for toggling sync to exact content framerate (#13725)
* Add hotkey for toggling sync to exact content framerate

* CHANGES.md: add sync to exact content framerate toggle hotkey
2022-03-10 17:21:08 +01:00
Colin Kinloch
3b08d63b23
(Wayland) Initial drag and drop (wl_data_offer) support (#13515) 2022-03-09 16:34:47 +01:00
twinaphex
9bcee062ff Cleanups/warnings 2022-03-07 19:32:01 +01:00
Vladimir Serbinenko
c11a798467
Series of djgpp fixes (#13705)
* 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
2022-03-05 15:53:18 +01:00
Tony
e8e8404741
(WinRaw) Enable mouse overlay control (#13688) 2022-03-01 09:45:07 +01:00
Tony
f0d9add1b2
(DInput/WinRaw) Ignore 'unknown/undefined' key (#13660) 2022-02-24 07:10:47 +01:00
Colin Kinloch
6dec52fda7
(Wayland) Fix wayland vulkan not reacting to initial resize (#13640)
(Wayland) Correct log stamps for GL or Vulkan

(Wayland) Fix style issues and sync formatting on identical code in GL and Vulkan
2022-02-22 08:58:46 +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
Colin Kinloch
b2527b43e8
(Wayland) Show window early to get screen info (#13591)
* (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
2022-02-18 19:59:41 +01:00
Autechre
b45a192416
Revert "(Wayland) Show window early to get screen info (#13582)" (#13590)
This reverts commit 4bb2c14293.
2022-02-01 12:47:53 +01:00
Colin Kinloch
4bb2c14293
(Wayland) Show window early to get screen info (#13582)
* 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
2022-02-01 10:30:34 +01:00
Tony
6d5d2e722d
Logging cleanups (#13579) 2022-01-31 18:05:23 +01:00
Colin Kinloch
a431760829
(Wayland) Release keys and mouse buttons on lost focus (#13567) 2022-01-29 19:57:06 +01:00
twinaphex
60eaf14afc C89_BUILDFIX 2022-01-29 10:55:31 +01:00
Dystopian
0afdb2a0cf
Improve udev logging (#13549) 2022-01-29 10:57:38 +01:00
Francisco Javier Trujillo Mata
86b47b4859
[PSP] Update Retroarch to latest PSPDev status (#13544)
* Added newlib changes

* Add action to launch PPSSPP simulator

* Remove legacy config for the stack and heap

* Add pthread

* Simplify kernel_functions and improve references to HAVE_KERNEL_PRX

* Add some flags

* Improve audio init/deinit

* Improve exit by clicking home

* Add CI for PSP1

* Update PSP.yml
2022-01-25 03:50:18 +01:00
Ryan Kuba
6ae1270e5c
remove test for standard mapping in controller detection (#13528) 2022-01-24 16:31:03 +01:00
Keith Bowes
38e74ee3cf
Restores mouse-grab toggling in Wayland. (#13537)
* Fixes mouse-grab toggling in Wayland.

Fixes #13536

* Indicate that input_wl_grab_mouse is a necessary function.

It might prevent it from being removed again in future cleanups.
2022-01-24 16:22:21 +01:00
twinaphex
5241d3e5d6 Cleanups 2022-01-20 06:09:43 +01:00
twinaphex
cc756e4126 Silence some warnings 2022-01-19 19:08:22 +01:00
Dystopian
2095fc53f8
Fix webOS build and run (#13480) 2022-01-12 07:12:34 +01:00
Cthulhu-throwaway
9579810579
Build fix for --disable-menu (#13419) 2021-12-26 15:18:57 +01:00
Aleksey Samoilov
f17deb90c7
[Wayland] Fix toplevel close (#13415) 2021-12-25 11:19:27 +01:00
Colin Kinloch
0168fe0303
(Wayland) Ignore mouse clicks on window decoration (#13412) 2021-12-25 04:08:22 +01:00
Colin Kinloch
f0392474f2
(Wayland) Add libdecor for client side decoration (#13397) 2021-12-24 14:20:45 +01:00
twinaphex
393e42a497 (Wayland) Buildfix 2021-12-24 05:25:30 +01:00
Colin Kinloch
c48d533950
(Wayland) Add scroll wheel support (#13398) 2021-12-24 03:42:33 +01:00
Nikos Chantziaras
0357b6c922
Add on-screen statistics toggle hotkey (#13381)
* Add on-screen statistics toggle hotkey

* CHANGES.md: Add technical statistics hotkey
2021-12-21 00:03:35 +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
arpruss
e5e6f343ac
convert abs mouse from screen to viewport coordinates; fix relative m… (#13258)
* convert abs mouse from screen to viewport coordinates; fix relative mouse code to work in screen mode

* C89 compatibility

* revert accidental include
2021-12-18 17:52:27 +01:00
Tony
8cc423e036
Logging cleanups (#13370) 2021-12-17 18:04:24 +01:00
Francisco Javier Trujillo Mata
1cd0938cc3
[PS2] Improve Compilation (#13359)
* 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
2021-12-15 19:01:56 +01:00
twinaphex
bfeffb2423 Fix local header path includes 2021-12-04 16:11:02 +01:00
gblues
bf9706395d
Fix gamepad disconnect on unrecognized HID device (#13321)
== DETAILS
So, the reason the gamepad was getting deregistered was
because adapter free code wasn't properly handling null-interface
adapters, causing the gamepad to match erroneously and get
deregistered.

This doesn't fix the weird "Generic SNES USB" detection issue,
but it should make it non-fatal.

Co-authored-by: Nathan Strong <nstrong@tripwire.com>
2021-12-04 12:43:58 +01:00
gblues
1dd15ac516
WIIU: Fix keyboard support (#13308)
== DETAILS
The problem was caused by changing the driver lookup point. The deferred
lookup resulted in the WIIU trying to treat the keyboard as a gamepad which ...
didn't work.

This change short-circuits at the connection event by ignoring mouse &
keyboard connection events.

Tested this with a dev build.

Co-authored-by: Nathan Strong <nstrong@tripwire.com>
2021-12-02 12:43:19 +01:00
Aaron Ramirez
97f3fca139
Fixes a bug where the Gyroscope and Accelerometer would not be re-enabled when the app regains focus or is resumed. (#13298) 2021-11-29 16:53:13 +01:00
twinaphex
b4137915e8 Move code to proper locations 2021-11-23 16:58:36 +01:00
twinaphex
c2c36177b8 Move two variables to input_driver.c 2021-11-22 15:26:54 +01:00
Autechre
2b87cd9313
Create runloop.c and split up runloop code to this new file; (#13269)
* Create runloop.c and split up runloop code to this new file;
retroarch.c now 207Kb and runloop.c 301Kb

* Define empty runloop_secondary_core_destroy
2021-11-22 03:27:23 +01:00
Tomáš Kelemen (vudiq)
0cf437e375
Lakka/Nintendo Switch: disable rumble gain
Rumble gain breaks controlls on Nintendo Switch port of Lakka, probably
due to issue in the driver).

Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-06-switch_disable_rumble_gain.patch
2021-11-18 00:36:11 +01:00
Jean-André Santoni
6a99832a4d
Lakka: Patch to fix keyboard typing
Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-01-xkb-fix.patch
2021-11-18 00:36:11 +01:00
twinaphex
efa16a8fca Revert "(Netplay) Cthulhu88 -"
This reverts commit cb4028fd3d.
2021-11-12 19:00:42 +01:00