Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
96ec45a
samples/tasks: repair database demo, add decompress test
LibretroAdmin Apr 19, 2026
d113e2a
(libretro-common) Remove custom MD5 typedefs
LibretroAdmin Apr 19, 2026
509c0ea
Add TargetConditionals.h header include in config.def.h
LibretroAdmin Apr 19, 2026
acd0b89
.github: CI workflow for samples/tasks
LibretroAdmin Apr 19, 2026
a906492
libretro-common/md5: skip built-in implementation on Apple
LibretroAdmin Apr 19, 2026
0ef2531
Buildfix
LibretroAdmin Apr 19, 2026
1a0d26b
.github: fix samples/tasks CI step killed by default set -e
LibretroAdmin Apr 19, 2026
c72a70d
Partially restore sync load and load wallpaper earlier to fix texture…
Ryunam Apr 19, 2026
53a26bc
.github: run samples workflows on every master push
LibretroAdmin Apr 19, 2026
cf73f1a
libretro-common/vfs: fix three real bugs + regression test
LibretroAdmin Apr 19, 2026
b431965
cdfs: fix createdvd CHD hashing for PS2/PSP RetroAchievements (#18955)
lazepeda01 Apr 19, 2026
18e15ad
libretro-common/vfs_cdrom: fix four bugs + regression test
LibretroAdmin Apr 19, 2026
ac95b67
libretro-common/vfs_smb: fix silent truncations in read/write/stat
LibretroAdmin Apr 19, 2026
39fcefe
libretro-common/samples/net: fix bit-rot in net_http_test
LibretroAdmin Apr 19, 2026
fd69102
libretro-common/net: fix buffer overflow in string_parse_html_anchor …
LibretroAdmin Apr 19, 2026
66155ff
libretro-common/net: harden net_http.c response parser and net_http_new
LibretroAdmin Apr 19, 2026
0da5c81
asan
warmenhoven Apr 19, 2026
8596a03
fix cloud sync options when non-webdav/s3 are selected
warmenhoven Apr 19, 2026
eb86df0
libretro-common/net: Priority B hardening in net_http.c
LibretroAdmin Apr 19, 2026
f3bf03e
libretro-common/formats/json/rjson: integer overflow hardening + test
LibretroAdmin Apr 19, 2026
9127a5e
libretro-common/samples/streams/rzip: silence fgets -Wunused-result
LibretroAdmin Apr 19, 2026
1180b62
Webp (#18956)
LibretroAdmin Apr 19, 2026
dc4872c
(IOHIDManager) Silence warning
LibretroAdmin Apr 19, 2026
10e6280
FIx some paths and warnings
LibretroAdmin Apr 19, 2026
afae28f
Add CoreFoundation/CoreFoundation.h header include in apple_compat.h
LibretroAdmin Apr 19, 2026
9093045
(Webp) Disable it by default for now - can be built in for now
LibretroAdmin Apr 19, 2026
2224e37
fix some mac include stuff
warmenhoven Apr 19, 2026
0bdcb81
(Apple) Add missing dispserv_apple
LibretroAdmin Apr 19, 2026
cd8e750
Buildfix
LibretroAdmin Apr 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/Linux-libretro-common-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@ on:
push:
branches:
- master
paths:
- 'libretro-common/**'
- '.github/workflows/Linux-libretro-common-samples.yml'
pull_request:
branches:
- master
paths:
- 'libretro-common/**'
- '.github/workflows/Linux-libretro-common-samples.yml'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -58,6 +52,10 @@ jobs:
rpng
rzip_chunk_size_test
net_ifinfo
vfs_read_overflow_test
cdrom_cuesheet_overflow_test
http_parse_test
rjson_test
)

# Per-binary run command (overrides ./<binary> if present).
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/Linux-samples-tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI Linux samples/tasks

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

permissions:
contents: read

env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
samples-tasks:
name: Build and run samples/tasks
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y build-essential zlib1g-dev

- name: Checkout
uses: actions/checkout@v3

- name: Build database_task
shell: bash
working-directory: samples/tasks/database
run: |
set -eu
make clean all
test -x database_task

- name: Smoke-test database_task argv parsing
shell: bash
working-directory: samples/tasks/database
run: |
set -u
# database_task with no args should print the usage line and
# exit non-zero. This catches build regressions in the argv
# parsing / main() entry path without depending on the task
# queue actually running to completion -- task_push_dbscan
# delegates to task_push_manual_content_scan which does not
# plumb through the caller's completion callback, so the
# loop can only be terminated externally (by timeout or
# signal). The full loop is exercised in local testing; in
# CI we settle for the argv smoke.
#
# We capture the exit status via "|| rc=$?" so that the
# expected non-zero exit does NOT trip the default "set -e"
# that GitHub Actions' bash shell injects (it wraps with
# "bash --noprofile --norc -eo pipefail"). Without this
# guard the step exits at the binary invocation before our
# assertion runs.
rc=0
./database_task > /dev/null 2>&1 || rc=$?
if [[ $rc -eq 0 ]]; then
echo "::error title=Test failed::database_task with no args exited 0; expected non-zero (usage)"
exit 1
fi
echo "[pass] database_task no-args exit=$rc (expected non-zero)"

- name: Build and run archive_name_safety_test
shell: bash
working-directory: samples/tasks/decompress
run: |
set -eu
make clean all
test -x archive_name_safety_test
# Regression test for the Zip Slip / absolute-path defences
# in tasks/task_decompress.c::archive_name_is_safe(). The
# test keeps a verbatim copy of the predicate and runs it
# against 23 safe and unsafe inputs. If task_decompress.c
# ever amends the predicate, the copy here must follow.
timeout 60 ./archive_name_safety_test
echo "[pass] archive_name_safety_test"
9 changes: 9 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,10 @@ ifeq ($(HAVE_OPENDINGUX_FBDEV), 1)
OBJ += gfx/drivers_context/opendingux_fbdev_ctx.o
endif

ifneq ($(findstring Darwin,$(OS)),)
OBJ += gfx/display_servers/dispserv_apple.o
endif

ifeq ($(HAVE_X11), 1)
OBJ += input/common/input_x11_common.o \
input/drivers/x11_input.o \
Expand Down Expand Up @@ -2202,6 +2206,11 @@ ifeq ($(HAVE_RBMP), 1)
OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp.o
endif

ifeq ($(HAVE_RWEBP), 1)
DEFINES += -DHAVE_RWEBP
OBJ += $(LIBRETRO_COMM_DIR)/formats/webp/rwebp.o
endif

OBJ += $(LIBRETRO_COMM_DIR)/formats/bmp/rbmp_encode.o \
$(LIBRETRO_COMM_DIR)/formats/json/rjson.o \
$(LIBRETRO_COMM_DIR)/formats/image_transfer.o \
Expand Down
3 changes: 3 additions & 0 deletions audio/drivers/sdl_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@
#include <retro_inline.h>
#include <retro_math.h>
#include <lists/string_list.h>
#include <string/stdstring.h>

#include "SDL.h"
#include "SDL_audio.h"

#include "../audio_driver.h"
#include "../../msg_hash.h"
#include "../../runloop.h"
#include "../../verbosity.h"

static INLINE int sdl_audio_find_num_frames(int rate, int latency)
Expand Down
5 changes: 5 additions & 0 deletions config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

#include <boolean.h>
#include <audio/audio_resampler.h>

#ifdef __MACH__
#include <TargetConditionals.h>
#endif

#include "configuration.h"
#include "gfx/video_defines.h"
#include "input/input_defines.h"
Expand Down
6 changes: 6 additions & 0 deletions config.features.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,12 @@
#define SUPPORTS_RTGA false
#endif

#ifdef HAVE_RWEBP
#define SUPPORTS_RWEBP true
#else
#define SUPPORTS_RWEBP false
#endif

#ifdef HAVE_CORETEXT
#define SUPPORTS_CORETEXT true
#else
Expand Down
8 changes: 6 additions & 2 deletions cores/libretro-imageviewer/image_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <streams/file_stream.h>

#if defined(HAVE_RPNG) || defined(HAVE_RJPEG) || defined(HAVE_RTGA) || defined(HAVE_RBMP)
#if defined(HAVE_RPNG) || defined(HAVE_RJPEG) || defined(HAVE_RTGA) || defined(HAVE_RBMP) || defined(HAVE_RWEBP)
#define PREFER_NON_STB_IMAGE
#endif

Expand Down Expand Up @@ -91,7 +91,11 @@ static const char image_formats[] =
"|tga"
#endif

#if !defined(HAVE_RJPEG) && !defined(HAVE_RPNG) && !defined(HAVE_RBMP) && !defined(HAVE_RTGA)
#ifdef HAVE_RWEBP
"|webp"
#endif

#if !defined(HAVE_RJPEG) && !defined(HAVE_RPNG) && !defined(HAVE_RBMP) && !defined(HAVE_RTGA) && !defined(HAVE_RWEBP)
#error "can't build this core with no image formats"
#endif
;
Expand Down
2 changes: 2 additions & 0 deletions gfx/drivers_context/cocoa_gl_ctx.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "../../config.h"
#endif

#include <TargetConditionals.h>

#if TARGET_OS_IPHONE
#include <CoreGraphics/CoreGraphics.h>
#else
Expand Down
3 changes: 3 additions & 0 deletions griffin/griffin.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ VIDEO IMAGE
#ifdef HAVE_RBMP
#include "../libretro-common/formats/bmp/rbmp.c"
#endif
#ifdef HAVE_RWEBP
#include "../libretro-common/formats/webp/rwebp.c"
#endif

#include "../libretro-common/formats/bmp/rbmp_encode.c"
#ifdef HAVE_RWAV
Expand Down
2 changes: 1 addition & 1 deletion input/drivers_hid/iohidmanager_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ static void iohidmanager_hid_device_add(IOHIDDeviceRef device, iohidmanager_hid_
if (adapter->slot == -1)
goto error;

if (!adapter->name || !*adapter->name)
if (!*adapter->name)
strcpy(adapter->name, "Unknown Controller With No Name");

if (pad_connection_has_interface(hid->slots, adapter->slot))
Expand Down
7 changes: 7 additions & 0 deletions libretro-common/formats/image_texture.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ enum image_type_enum image_texture_get_type(const char *path)
(ext[2] | 0x20) == 'e' &&
(ext[3] | 0x20) == 'g')
return IMAGE_TYPE_JPEG;
#endif
#ifdef HAVE_RWEBP
if ((ext[0] | 0x20) == 'w' &&
(ext[1] | 0x20) == 'e' &&
(ext[2] | 0x20) == 'b' &&
(ext[3] | 0x20) == 'p')
return IMAGE_TYPE_WEBP;
#endif
break;
}
Expand Down
33 changes: 33 additions & 0 deletions libretro-common/formats/image_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#ifdef HAVE_RBMP
#include <formats/rbmp.h>
#endif
#ifdef HAVE_RWEBP
#include <formats/rwebp.h>
#endif

#include <formats/image.h>

Expand Down Expand Up @@ -67,6 +70,11 @@ void image_transfer_free(void *data, enum image_type_enum type)
case IMAGE_TYPE_BMP:
#ifdef HAVE_RBMP
rbmp_free((rbmp_t*)data);
#endif
break;
case IMAGE_TYPE_WEBP:
#ifdef HAVE_RWEBP
rwebp_free((rwebp_t*)data);
#endif
break;
case IMAGE_TYPE_NONE:
Expand Down Expand Up @@ -101,6 +109,12 @@ void *image_transfer_new(enum image_type_enum type)
return rbmp_alloc();
#else
break;
#endif
case IMAGE_TYPE_WEBP:
#ifdef HAVE_RWEBP
return rwebp_alloc();
#else
break;
#endif
default:
break;
Expand Down Expand Up @@ -138,6 +152,8 @@ bool image_transfer_start(void *data, enum image_type_enum type)
#endif
case IMAGE_TYPE_BMP:
return true;
case IMAGE_TYPE_WEBP:
return true;
case IMAGE_TYPE_NONE:
break;
}
Expand Down Expand Up @@ -171,6 +187,8 @@ bool image_transfer_is_valid(
#endif
case IMAGE_TYPE_BMP:
return true;
case IMAGE_TYPE_WEBP:
return true;
case IMAGE_TYPE_NONE:
break;
}
Expand Down Expand Up @@ -204,6 +222,11 @@ void image_transfer_set_buffer_ptr(
case IMAGE_TYPE_BMP:
#ifdef HAVE_RBMP
rbmp_set_buf_ptr((rbmp_t*)data, (uint8_t*)ptr);
#endif
break;
case IMAGE_TYPE_WEBP:
#ifdef HAVE_RWEBP
rwebp_set_buf_ptr((rwebp_t*)data, (uint8_t*)ptr, len);
#endif
break;
case IMAGE_TYPE_NONE:
Expand Down Expand Up @@ -254,6 +277,14 @@ int image_transfer_process(
break;
#else
break;
#endif
case IMAGE_TYPE_WEBP:
#ifdef HAVE_RWEBP
ret = rwebp_process_image((rwebp_t*)data,
(void**)buf, len, width, height, supports_rgba);
break;
#else
break;
#endif
case IMAGE_TYPE_NONE:
break;
Expand Down Expand Up @@ -341,6 +372,8 @@ bool image_transfer_iterate(void *data, enum image_type_enum type)
#endif
case IMAGE_TYPE_BMP:
return false;
case IMAGE_TYPE_WEBP:
return false;
case IMAGE_TYPE_NONE:
return false;
}
Expand Down
Loading
Loading