Browse Source

[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 <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4179
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
lizzie/maxwell-use-params-instead-of-template
lizzie 3 days ago
committed by crueter
parent
commit
bfc0e60333
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 10
      src/common/stb.cpp
  2. 4
      src/common/stb.h
  3. 4
      src/core/hle/service/ns/read_only_application_control_data_interface.cpp

10
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"

4
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 <stb_image.h>
#include <stb_image_resize.h>
#include <stb_image_write.h>

4
src/core/hle/service/ns/read_only_application_control_data_interface.cpp

@ -7,10 +7,12 @@
#include <algorithm>
#include <vector>
#include <optional>
#include <string>
#define STBI_ONLY_JPEG 1
#include <stb_image.h>
#include <stb_image_resize.h>
#include <stb_image_write.h>
#include <string>
#include "common/settings.h"
#include "core/file_sys/control_metadata.h"

Loading…
Cancel
Save