46698 Commits
Author SHA1 Message Date
LibretroAdmin f385218654 Replace SPSCQueue with lock-free libretro-common queues
Every Common::SPSCQueue goes, and with it the mutexes in front of the
multi-producer ones:

- WorkQueueThread runs on an sthread fed by an mpsc_stack, so any
  thread pushes without a lock, and parks on retro_eventcount.
- AsyncRequests hands requests to the video thread through a
  retro_waitable_spsc of pointers; a blocking request lives on the
  caller's stack.
- CoreTiming's off-thread events and the DVD thread's results move to
  mpsc_stack, dropping the CoreTiming write lock.
- Real Wiimote reports cross threads as fixed 32-byte records in
  retro_spsc rings; the read thread receives straight into the ring.
- Bluetooth passthrough frees transfers through an mpsc_stack whose
  nodes live in the transfers' own buffers, queues incoming packets in
  mirrored retro_spsc rings and hands ACL data to IOS in place.
- PerformanceTracker's frame times move to a retro_spsc ring.
2026-11-05 13:00:22 +01:00
LibretroAdmin e4aed234da Remove NetPlay
The core never creates a NetPlay client or server; only the standalone
frontends did. Drop NetPlay with what only it used: the traversal
client, ENet, the QoS session, the NetPlay config layer and settings,
the chat and golf overlays, the netplay index, the save sync plumbing
in BootSessionData and WiiRoot, the disc sync hashes, and the Android
app's netplay feature and JNI bindings.
2026-11-05 13:00:19 +01:00
LibretroAdmin a27ceb33f8 Vendor libretro-common's rthreads, eventcount, SPSC queues and atomics
From RetroArch's libretro-common: rthreads, retro_eventcount,
retro_spsc, retro_waitable_spsc, mpsc_stack and retro_atomic, with the
units they need (features_cpu, rtime, compat_strl), built as their own
library group.
2026-11-05 13:00:15 +01:00
LibretroAdmin 1b8dfea3d0 Remove the audio backends and the SoundStream abstraction
The core only ever outputs through libretro, so drop the ALSA, cubeb,
null, OpenAL, OpenSL ES, PulseAudio and WASAPI streams, the backend
selection, and the vendored cubeb and OpenAL. SoundStream is now one
non-virtual class, implemented by the libretro output in
DolphinLibretro/Audio.cpp.

Also drop the settings only the backends read (backend, volume, mute,
mute on disabled speed limit, latency, WASAPI device) and the volume
and mute helpers. The mute-on-fast-forward toggle never had an effect,
as the libretro stream ignored volume changes.

The GameCube microphone, Wii Speak and Logitech mic keep their libretro
microphone path; the unbuilt cubeb capture path and its Windows COM
worker thread go.

Dolby Pro Logic II decoding (SurroundDecoder, FreeSurround) stays.
2026-11-05 05:38:09 +01:00
LibretroAdmin 74999e2082 Remove analytics
Drop DolphinAnalytics and Common/Analytics along with every game-quirk,
game-start, performance-sample and GPU-bug-override report, the
Main.Analytics settings, and the Android opt-in dialog, settings
entries, JNI hooks and session-timestamp tracking that only fed it.
DriverDetails loses its to_string helpers and stored driver name,
which only built the bug-override report.
2026-11-05 04:48:00 +01:00
LibretroAdmin c39e70854d Remove Discord Rich Presence, X11Utils and DolphinNoGUI
Discord presence was already disabled in the core (Host callbacks were
stubs and Boot turned it off); drop UICommon's DiscordPresence, the
vendored discord-rpc, its settings and the Host_UpdateDiscord* hooks.
The DolphinDevice Discord IOCTLs now answer IPC_EACCES, as Dolphin does
with presence disabled.

X11Utils was only used by DolphinNoGUI, a standalone frontend, so both
go.
2026-11-05 04:47:56 +01:00
LibretroAdmin dc7d0c21a0 Remove the updaters
UpdaterCommon, WinUpdater, MacUpdater and UICommon's AutoUpdate only
served the standalone Dolphin frontends; RetroArch updates the core.
Also drop the AutoUpdate settings, the update-track build string and
the u32 WindowsRegistry::ReadValue instantiation only WinUpdater used.
2026-11-05 04:47:53 +01:00
LibretroAdmin 55857660c6 Remove DSPSpy and DSPTool
DSPSpy is homebrew that runs on a real GameCube/Wii and DSPTool is a
standalone DSP assembler CLI; neither is part of the libretro core.
2026-11-05 04:31:42 +01:00
LibretroAdmin ec372a67b6 Remove Qt
The core runs only inside a libretro frontend. The Qt frontend and its
submodule go, together with what only it used: the Qt DBus screensaver
inhibit, the JIT's single-block erase, the string translator hook, the
Qt translation catalogs and Transifex config, the desktop packaging
(NSIS, RPM, Flatpak) and the autoupdate overview.
2026-11-05 04:28:14 +01:00
LibretroAdmin b7e2db4e32 Remove SDL
The core takes its input from the libretro frontend and never builds the
SDL controller backend. The SDL submodule, the backend, its config entries
and the SDL hints and version bits of the Qt frontend go.
2026-11-05 04:28:11 +01:00
LibretroAdmin 057a10b834 Remove the CMake build
The static Makefile is the only build. GitLab CI and the GitHub workflows
build with it, with the same lanes and toolchains; the MSVC workflow and
the CMake-only macOS universal-binary script go, as nothing builds them.
The Readme describes the Makefile build.
2026-11-05 03:13:53 +01:00
LibretroAdmin deaaab1c9b Makefile: detect Windows without platform=win
A bare make picks the Windows build from OS=Windows_NT, which every MSYS2
environment sets whatever uname -s reports, or from a MinGW-w64 CC. The
Windows build defaults to gcc/g++ instead of make's built-in cc.
2026-11-05 01:50:03 +01:00
LibretroAdmin ceaabff5ed Makefile: link from a response file on Windows
The core's object list is longer than the 32 KiB Windows command line,
so the win platforms hand it to the linker as @file.
2026-11-05 00:45:31 +01:00
LibretroAdmin 6e35fc179b Add a static Makefile for the libretro core
Builds parallel_gamecubewii_libretro for every lane .gitlab-ci.yml covers:
unix (Linux x86_64/aarch64), webos, win64 (MinGW-w64), osx (x86_64/arm64,
CROSS_COMPILE), ios-arm64, tvos-arm64, android-arm64 and android-x86_64.
The source lists and per-library flags follow what the CMake LIBRETRO=ON
build links into the core, without the units only the standalone frontends
use. The per-platform configure results for curl, libusb, libiconv and mGBA
are checked in under Externals/<library>/makefile; the remaining generated
files are produced by the Makefile under obj/gen.

The Android input backend's JNI entry points belong to the Android app and
are left out of the core, which links with --no-undefined everywhere.

The Windows code builds against MinGW-w64 headers older than 12.0 as well:
D3D12 includes d3d12sdklayers.h explicitly, and the constants, declarations
and const-correct pointer types those headers lack for D3D12, device
notifications, the Wii Remote Bluetooth path, the IOS IP stack and thread
naming are provided locally.
2026-11-04 23:49:57 +01:00
Craig 32c61f9d0e Merge pull request #527 from sunlollyking/region-free-from-game-id
libretro: Run a region-free title in the region its game ID names
2026-11-04 12:00:28 +00:00
Craig 691aa0021f Merge pull request #532 from mohammadsyuhada/nx/sensors-follow-port-device
libretro: Input: re-ask for motion sensors when a port's device is set, and clear stale IMU bindings
2026-11-04 11:59:59 +00:00
Craig 7855d50b23 Merge pull request #529 from mohammadsyuhada/nx/option-default-values
libretro: Options: shader compilation and output resampling defaults are among their values
2026-11-04 11:59:17 +00:00
Craig 61119271c7 Merge pull request #528 from mohammadsyuhada/nx/hack-options-base-layer
libretro: Options: graphics hacks go to the base config layer, so a game's INI fixes keep winning
2026-11-04 11:59:00 +00:00
Craig 0820408c2c Merge pull request #533 from mohammadsyuhada/nx/wii-menu-closes-game
libretro: returning to the Wii Menu closes the game instead of hanging on a black screen
2026-11-04 11:58:31 +00:00
Craig e606199970 Merge pull request #534 from mohammadsyuhada/nx/wiimote-hid-source-guard
IOS/Wiimote: skip HID output for a remote whose source is gone
2026-11-04 11:58:10 +00:00
Mohammad Syuhada 192f6bdca8 IOS/Wiimote: keep the source guard under __LIBRETRO__ 2026-11-04 19:00:45 +08:00
Mohammad Syuhada 2f3c06b13b libretro: Options: drop the code comments on the defaults 2026-11-04 19:00:42 +08:00
Mohammad Syuhada f78a8f6a9d libretro: drop the code comment on the graphics hack options 2026-11-04 19:00:18 +08:00
Craig 69b62d1add Merge pull request #531 from mohammadsyuhada/nx/refuse-load-without-hw-context
libretro: fail the load when the hardware renderer gets no hardware context
2026-11-04 10:45:51 +00:00
Craig 62aa71377f Merge pull request #530 from mohammadsyuhada/nx/sync-gpu-option
libretro: Options: add Synchronize GPU Thread for dual core
2026-11-04 10:43:46 +00:00
Mohammad Syuhada a7605e77e4 libretro: Input: re-ask for motion sensors when a port's device is set, and clear stale IMU bindings 2026-11-03 12:39:27 +08:00
Mohammad Syuhada b046a7f1cc libretro: returning to the Wii Menu closes the game instead of hanging on a black screen 2026-11-03 12:39:27 +08:00
Mohammad Syuhada c250895222 IOS/Wiimote: skip HID output for a remote whose source is gone 2026-11-03 12:39:16 +08:00
Mohammad Syuhada 66e9ab0f50 libretro: fail the load when the hardware renderer gets no hardware context 2026-11-03 12:39:16 +08:00
Mohammad Syuhada e3dc08b055 libretro: Options: add Synchronize GPU Thread for dual core 2026-11-03 12:39:16 +08:00
Mohammad Syuhada 392b0b0563 libretro: Options: shader compilation and output resampling defaults are among their values 2026-11-03 12:39:15 +08:00
Mohammad Syuhada 63e7aa247c libretro: Options: graphics hacks go to the base config layer, so a game's INI fixes keep winning 2026-11-03 12:39:15 +08:00
Chris f2632026be libretro: Run a region-free title in the region its game ID names
A region-free title runs in the fallback region, which Dolphin takes
from the system locale. Kodi on LibreELEC runs with no locale, so that
is PAL, and Japanese WiiWare marked region-free hangs on a black screen.

Run such a title in the region its game ID names, for that run only.
Titles with a region of their own, and IDs that name none, are
unchanged.
2026-10-30 07:44:58 +00:00
Craig b93001ed50 Merge pull request #526 from WizzardSK/aspect-fix
libretro: Aspect Ratio: the frontend shows the picture at the mode's aspect ratio
2026-10-29 18:44:00 +00:00
WizzardSK 3d6c288145 libretro: Aspect Ratio: the frontend shows the picture at the mode's aspect ratio, Dolphin stretches it over the frame
Dolphin fitted its picture into the frame by the Aspect Ratio mode, bars
and all, and the frontend scaled the frame to 4:3 or 16:9 once more, so
every mode but Stretch came out squeezed or stretched (Custom, Custom
Stretch and Raw the most). Dolphin now always stretches over the frame,
and the core gives the frontend the aspect ratio Dolphin works out for the
chosen mode (Presenter::CalculateDrawAspectRatio for a given mode), again
whenever it changes. Stretch and VR are as before.

Vulkan hands the frontend the whole swapchain image Dolphin presented
into, as D3D11 and OpenGL do with their backbuffer, instead of the EFB's
size (640x528 against a 640x480 image), which squeezed the picture.
2026-10-28 19:26:30 +01:00
Craig c386bd3b95 Merge pull request #525 from WizzardSK/d3d11-restore-state
libretro: D3D11: restore every binding after the frontend draws (black screen with shaders)
2026-10-28 17:09:51 +00:00
WizzardSK bf3618732b libretro: D3D11: restore every binding after the frontend draws, and leave it none of the core's constant buffers
StateManager::Restore() bound back only slot 0 of the vertex shader's
constant buffers and neither the custom constants at slot 2 nor the
framebuffer, while it told Apply() they were all the core's. A shader
preset binds its uniform and push constant buffers at slots 0 and 1, so
the core went on drawing with the preset's buffer at slot 1: a black
picture with sound, which stayed black after the preset was turned off
(#378, #452). The frontend's passes also found the core's 64-byte
buffer at the vertex shader's slot 1.
2026-10-28 17:31:20 +01:00
Craig 3aac3f052f Merge pull request #523 from WizzardSK/fix-gpu-loop-race
libretro: keep the GPU loop's stop request until the loop sees it
2026-10-23 12:50:53 +01:00
Craig e962c70c32 Merge pull request #521 from sunlollyking/real-wiimote-option
libretro: Add a Wiimote device option
2026-10-23 12:42:47 +01:00
WizzardSK d3ca3028d5 libretro: keep the GPU loop's stop request until the loop sees it
In dual core mode the CPU thread ends the frame with StopGpuLoop() while
retro_run() runs the GPU loop. When the CPU thread got there before the
frontend thread entered RunGpuLoop(), the loop of the last frame still
counted as stopped, the Stop() did nothing, and RunGpuLoop() ran with
nothing to end it: the frontend hung in retro_run() and the CPU thread
stayed paused. StopGpuLoop() now also sets a flag the loop checks on
each pass, cleared once the loop has ended.

Fixes #462
2026-10-23 12:09:05 +02:00
Craig eb68258ab5 Merge pull request #522 from cscd98/popup-messages
libretro: disable popups by default
2026-10-23 10:18:31 +01:00
Chris 4d2cc5b697 libretro: Add a Wiimote device option
A frontend can only get a real Wiimote by offering the Real WiiMote
device for each port, next to the emulated Wiimote. This option lets the
player pick one device for every Wii port instead, in place of what the
frontend set: any of the Wiimote devices, a Real WiiMote or a GameCube
Controller. Left at "Set per port", the frontend's choice stands.

Real WiiMote also scans for Wiimotes continuously, since a real one is
only found by scanning.
2026-10-23 09:50:39 +01:00
Craig Carnell 84954d9926 libretro: disable popups by default 2026-10-23 09:39:47 +01:00
Craig 5466da350f Merge pull request #519 from cscd98/webos-fix3
libretro: fix shader cache when changing supportsBindingLayout option
2026-10-16 19:55:04 +01:00
Craig Carnell 492f485c67 libretro: fix shader cache when changing supportsBindingLayout option 2026-10-16 16:25:04 +01:00
Craig 91209a946f Merge pull request #518 from cscd98/vr-mode
libretro: add VR mode
2026-10-16 15:09:50 +01:00
Craig Carnell be7f2f5973 libretro: add VR mode 2026-10-16 14:27:05 +01:00
Craig 0238cdcc52 Merge pull request #517 from cscd98/audio-fix
Update libretro.h, fix audio stutter on mode 1/2
2026-10-16 11:00:00 +01:00
Craig Carnell d277222a81 libretro: fix audio stutters in both refresh rate modes 2026-10-16 10:33:11 +01:00
Craig Carnell 2fccc04935 Update libretro.h 2026-10-16 10:27:38 +01:00