12 Commits
Author SHA1 Message Date
LibretroAdmin a025681d84 salamander: link only what the launchers use
No launcher calls into lrc_hash.c, and on x86 its SHA dispatch reaches
cpu_features_get(), which no launcher links: the DOS salamander, whose
link keeps every section, cannot resolve it. lrc_hash.o leaves every
salamander object list. The Wii launcher's logger build links
net_socket.c, which reads cpu_features_get_time_usec(), so that build
links features_cpu.o as well.

compile-matrix.sh now links each launcher's libretro-common list, read
from its Makefile, with frontend_salamander.c and a host frontend
driver (tools/platform_stubs/salamander_frontend.c), so a unit in a
list that needs one outside it fails there.
2026-10-26 04:21:05 +01:00
LibretroAdmin ccffeb553a slang: drop vendored glslang and SPIRV-Cross
rslc is the slang compiler everywhere. ./configure --enable-glslang
--enable-spirv_cross links the system's glslang and SPIRV-Cross next to
it when both are found, and only then does Settings > Drivers offer a
Shader Compiler choice between the two: one setting read per stage
picks the path, with nothing copied.

The MSVC 2010 project builds Vulkan and rslc. Samples that used the
vendored copies run on rslc or the system's SPIRV-Cross.
2026-10-25 08:52:52 +01:00
Codex 7a3bcbdc28 media: route image and movie activation to the internal viewer
Open supported external media in the fullscreen menu viewer and keep image confirmation there across all four menu drivers. Disable the legacy imageviewer core in normal build configurations while preserving its sources and Griffin guard.
2026-10-24 01:00:53 +02:00
LibretroAdmin f46c6019dd (CHD) Every platform reads CHD with rchd
The built-in reader was opt-in and almost nothing opted in. Only
Makefile.webos set HAVE_RCHD; the configure default was no, so every
configure-based build took libchdr, and ten platform makefiles enabled
HAVE_CHD without ever mentioning rchd - dingux, dos and its salamander,
lfx000, libnx, miyoo, orbis, retrofw, rg350 and rg350_odbeta.

So the answer to "which platforms still use libchdr" was: all of them
but one.

The configure default is yes now and those ten set it, which leaves no
build in the tree enabling CHD without rchd. Where HAVE_RCHD is set,
Makefile.common compiles formats/chd/rchd.c and none of libchdr at
all - confirmed by configuring here and finding no libchdr object in
config.mk.

What the reader needs is already handled in that branch: deflate and
LZMA unconditionally, FLAC where HAVE_FLAC or HAVE_RFLAC is on, zstd
where HAVE_RZSTD is, and encoding_huffman always, because a version 5
map is Huffman-coded and is needed to open an image whatever its hunks
use.

Worth saying plainly: nothing exercises rchd automatically.
libretro-common/tools/chd carries six rchd_*_test.c programs, and none
of them has a Makefile or a workflow step, so this flip rests on the
reader being right rather than on anything measured. Wiring those up
is the obvious next thing.

Every makefile I touched still parses - clean is reached on all of
them. The thirteen that do not parse here need their own toolchains
and failed identically before this change, which was checked rather
than assumed.
2026-09-14 01:05:42 +02:00
LibretroAdmin 41b523c3fc buildsystem: rstrtod.o in every OBJ list that links config_file or file_stream
The strtod conversion wired Makefile.common, griffin, and the two MSVC
Salamander projects, and missed everything else that compiles
libretro-common sources from its own list: all eight console Salamander
makefiles (ctr, dos, orbis, ps2, psl1ght, psp1, vita, wii) plus the
wiiu one, the libretro-common sample makefiles, and Makefile.test.
Every source list that pulls config_file.c, config_file_userdata.c,
file_stream.c, or rjson.c now carries string/rstrtod.c; lists that do
not need it were left alone, including per-object rules that name those
files as a compile input rather than a link set.

Checked against every entry point in the tree: each console main build
routes through griffin or Makefile.common, the Xcode, Android, and MSVC
projects build griffin, and every workflow under .github/workflows maps
to one of the covered entry points. All 36 sample programs and the
Makefile.test suites build and pass with the exact CI invocation, and
the parser itself runs the differential suite bit-exact under qemu on
big-endian PowerPC and 32-bit ARM, the two architecture families the
console targets add.
2026-08-22 13:26:29 +02:00
S 0a9fc6d4f7 (Font) Always build stb_truetype
stb_truetype was optional and seven targets turned it off - the
Dingux-family handhelds (rg350, rg350_odbeta, retrofw, rs90, miyoo,
lfx000), which also build without FreeType, leaving
bitmap_font_renderer as their only font renderer.

The cost of always having it is small: 8.2 KB of text at -Os, against
a multi-megabyte binary. The cost of it being optional is 44
references across fifteen makefiles, the configure script, three
feature-reporting sites and two preprocessor conditionals in
menu_screensaver.c that are unreadable precisely because they encode
which platforms happen to enable it.

Drop the option. stb is now guaranteed present, which is also what
lets the next commit make it the single fallback renderer.

The two menu_screensaver.c conditionals become unconditional: both
were asking "is any font renderer available", and now one always is.
2026-08-08 04:44:46 +02:00
LibretroAdmin 1d1f27a025 config_file: audit and rework — zero-copy pooled parsing (−63% load, −48% write, −99.8% heap ops), injectable file I/O, streaming API, autoconfig profile index (437 opens → 2), 5 pre-existing bugs fixed, fuzzing + regression tests in CI (#19305) 2026-07-30 08:47:22 +02:00
libretroadmin dfd4a95327 Remove HAVE_BUILTINZLIB and the vendored deps/libz
The clean-room DEFLATE/inflate codec in encodings/deflate.c is now the
only decompression path. Every consumer already selected it when
HAVE_ZLIB was undefined -- archive_file_zlib, libchdr's zlib codec and
trans_stream all carry the fallback -- so the vendored zlib copy had no
remaining purpose.

Makefile.common: drop the HAVE_BUILTINZLIB object list and the
HAVE_ZLIB_COMMON aggregate. HAVE_ZLIB=1 now only adds
trans_stream_zlib.o, -DHAVE_ZLIB and $(ZLIB_LIBS). HAVE_CHD is gated on
itself rather than on zlib; HAVE_7ZIP and HAVE_RFLAC were already
outside the zlib gate and are unchanged.

griffin: drop the deps/libz includes and the HAVE_NO_BUILTINZLIB guard,
and unnest the CHD block from HAVE_ZLIB.

Platform makefiles: remove HAVE_BUILTINZLIB/HAVE_ZLIB and -DHAVE_ZLIB,
and drop -lz where zlib was its only consumer. wiiu additionally loses
its portlibs -lpng, which was a convenience for statically linked cores;
RetroArch itself builds HAVE_RPNG. libnx keeps -lpng -lz because its
ffmpeg chain links against both.

qb: drop the HAVE_BUILTINZLIB knob, its check_enabled entry and the
macOS workaround that existed only to avoid the vendored copy.
2026-07-24 09:55:04 +02:00
t 4b81bae553 buildsystem: HAVE_IBXM -> HAVE_RMODTRACKER everywhere; remove deps/ibxm
The vendored ibxm dependency is gone; the module replayer is now a
libretro-common citizen (formats/mod/rmodtracker.c) built like the
other decoders.  Mechanical flag migration across the tree:

  - Makefile.common: flag block renamed, object path moved from
    $(DEPS_DIR)/ibxm/ibxm.o to
    $(LIBRETRO_COMM_DIR)/formats/mod/rmodtracker.o (the rvorbis /
    rflac object pattern).
  - griffin: define and single-TU include swapped to the new file.
  - qb/config.params.sh and Makefile.griffin: flag renamed.
  - 15 platform Makefiles (dingux, dos, dos.salamander, emscripten,
    lfx000, libnx, miyoo, ngc, retrofw, rg350, rg350_odbeta, rs90,
    switch, webos, wii): flag renamed, values preserved (including
    ngc's =0).
  - retroarch.c, msg_hash.c, audio/audio_driver.c,
    menu/cbs/menu_cbs_deferred_push.c: the mod/s3m/xm extension
    gates renamed.
  - msvc-uwp vcxproj: 9 PreprocessorDefinitions entries renamed
    (define-only; UWP compiles via griffin, so there is no per-file
    entry to swap).  BOM and line endings preserved.
  - The iOS9 xcodeproj needed nothing: its apparent matches are the
    substring 'ibxm' inside 'libxml2'.
  - deps/ibxm: removed.

Tree-wide residual check: zero HAVE_IBXM / deps/ibxm references
remain; the only 'ibxm' tokens left are the provenance attribution
and licence retention inside rmodtracker itself.
2026-07-07 06:11:40 +02:00
libretroadmin 0db16c8898 formats: add rmp3 backend to audio_transfer; repoint mixer MP3; drop dr_mp3
Carve the vendored dr_mp3 single-header decoder into a first-party in-tree
decoder (rmp3), wire it under the codec-agnostic audio_transfer layer as the
AUDIO_TYPE_MP3 backend, repoint the audio mixer's MP3 voice onto
audio_transfer, and remove deps/dr/dr_mp3.h (deps/dr is now empty).

rmp3 is the whole dr_mp3 decoder with every exported symbol namespaced from
drmp3/DRMP3/dr_mp3 to rmp3/RMP3, so a statically-linked console core
vendoring its own dr_mp3 cannot collide at link with RetroArch's copy: the
object exports rmp3_* symbols only. dr_mp3 is already memory-only (no file
I/O to strip) and self-includes its CRT headers, so the impl wrapper is just
RMP3_IMPLEMENTATION plus the include.

dr_mp3 exposes only a float decode path (rmp3_read_f32) and no integer API,
so the backend reads f32 natively and quantises to s16 at the boundary via
the shared audio_transfer_f32_to_s16 helper (round-half-away, clamp) that
now also serves the Vorbis backend. Unlike FLAC/Vorbis the drmp3 handle is
embedded in the transfer context by value (dr_mp3 initialises in place), so
validity is tracked with a flag. The mixer's MP3 voice holds an opaque
audio_transfer context and drives it through
new/start/info/read_f32/seek/free.

Build: HAVE_DR_MP3 is renamed HAVE_RMP3 across the platform makefiles, the qb
knob and Android.mk. The existing Makefile.common HAVE_RMP3 branch gains
formats/mp3/rmp3.o (and audio_transfer.o once, guarded against the FLAC and
Vorbis branches). griffin includes rmp3.c under HAVE_RMP3 and shares
audio_transfer.c across all three backends.
2026-07-02 04:27:11 +02:00
libretroadmin cba7bef984 formats: add rvorbis backend to audio_transfer; repoint mixer OGG; drop stb_vorbis
Carve the vendored stb_vorbis single-header decoder into a first-party
in-tree decoder (rvorbis), wire it under the codec-agnostic audio_transfer
layer as the AUDIO_TYPE_VORBIS backend, repoint the audio mixer's OGG voice
onto audio_transfer, and remove deps/stb/stb_vorbis.h.

rvorbis is the whole stb_vorbis decoder with file I/O stripped
(RVORBIS_NO_STDIO) and every exported symbol namespaced from
stb_vorbis/STB_VORBIS/STBVorbis/VORBIS_ to rvorbis/RVORBIS/RVorbis/RVORBIS_,
so a statically-linked console core vendoring its own stb_vorbis cannot
collide at link with RetroArch's copy: the object exports rvorbis_* symbols
only. The header carries its own <stdint.h>/<stddef.h> and keeps the
fixed-width types the vendored copy already used.

Vorbis is a float-internal codec with no integer decode API, so the backend
reads f32 natively and quantises to s16 at the boundary (round-half-away,
clamp) rather than round-tripping. The mixer's OGG voice holds an opaque
audio_transfer context and drives it through
new/start/info/read_f32/seek/free; loop-to-start routes through
rvorbis_seek_start, since stb_vorbis's seek(0) does not rewind.

Build: HAVE_STB_VORBIS is renamed HAVE_RVORBIS across the platform
makefiles, the qb knob and Android.mk. Makefile.common gains a HAVE_RVORBIS
branch adding formats/vorbis/rvorbis.o (and audio_transfer.o once, guarded
against the FLAC branch). griffin includes rvorbis.c under HAVE_RVORBIS and
shares audio_transfer.c across both backends.
2026-07-02 04:13:53 +02:00
zoltanvb 24027ab1b3 More DOS updates: (#18700) 2026-02-14 14:01:13 +01:00