From f635827fa66c2c4e5d50136e147dd1ac1439cd3f Mon Sep 17 00:00:00 2001 From: lizzie Date: Fri, 28 Aug 2026 02:29:52 +0200 Subject: [PATCH] [common/stb] remove unused I/O funcs from non-LTO builds, use common/stb.h on ns service (#4282) Signed-off-by: lizzie - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- - remove I/O functions that are unused from LTO builds - use common/stb.h on ns simple change really, not much to explain here Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4282 Reviewed-by: Maufeat Reviewed-by: MaranBr Reviewed-by: CamilleLaVey --- src/common/stb.cpp | 2 -- src/common/stb.h | 1 + .../ns/read_only_application_control_data_interface.cpp | 6 +----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/common/stb.cpp b/src/common/stb.cpp index c80cc2526d..59e709e57d 100644 --- a/src/common/stb.cpp +++ b/src/common/stb.cpp @@ -7,6 +7,4 @@ #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 c2b5f54de5..bc8f651426 100644 --- a/src/common/stb.h +++ b/src/common/stb.h @@ -7,6 +7,7 @@ #pragma once #define STBI_ONLY_JPEG 1 +#define STBI_WRITE_NO_STDIO 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 6227fc44cc..6e486855d6 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 @@ -9,11 +9,7 @@ #include #include -#define STBI_ONLY_JPEG 1 -#include -#include -#include - +#include "common/stb.h" #include "common/settings.h" #include "core/file_sys/control_metadata.h" #include "core/file_sys/patch_manager.h"