From bfc0e60333310c252e168b354ba3eb0802510864 Mon Sep 17 00:00:00 2001 From: lizzie Date: Tue, 7 Jul 2026 19:51:51 +0200 Subject: [PATCH] [externals/stb] only include JPEG functions, disable all others (#4179) we use JPEG only with STB, dont need the others which are included in the final binary, after gc+lto this doesnt affect stb_dxt, which still includes all required BCn stuff Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4179 Reviewed-by: MaranBr Reviewed-by: CamilleLaVey --- src/common/stb.cpp | 10 +++++++--- src/common/stb.h | 4 ++++ .../read_only_application_control_data_interface.cpp | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/common/stb.cpp b/src/common/stb.cpp index d3b16665d4..c80cc2526d 100644 --- a/src/common/stb.cpp +++ b/src/common/stb.cpp @@ -1,8 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#define STB_IMAGE_IMPLEMENTATION -#define STB_IMAGE_RESIZE_IMPLEMENTATION -#define STB_IMAGE_WRITE_IMPLEMENTATION +#define STB_IMAGE_IMPLEMENTATION 1 +#define STB_IMAGE_RESIZE_IMPLEMENTATION 1 +#define STB_IMAGE_WRITE_IMPLEMENTATION 1 +#define STBI_ONLY_JPEG 1 #include "common/stb.h" diff --git a/src/common/stb.h b/src/common/stb.h index e5c197c11d..c2b5f54de5 100644 --- a/src/common/stb.h +++ b/src/common/stb.h @@ -1,8 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once +#define STBI_ONLY_JPEG 1 #include #include #include diff --git a/src/core/hle/service/ns/read_only_application_control_data_interface.cpp b/src/core/hle/service/ns/read_only_application_control_data_interface.cpp index 0f3228e601..6227fc44cc 100644 --- a/src/core/hle/service/ns/read_only_application_control_data_interface.cpp +++ b/src/core/hle/service/ns/read_only_application_control_data_interface.cpp @@ -7,10 +7,12 @@ #include #include #include +#include + +#define STBI_ONLY_JPEG 1 #include #include #include -#include #include "common/settings.h" #include "core/file_sys/control_metadata.h"