This commit is contained in:
michael
2026-01-17 02:49:32 +01:00
parent a1ccda2e88
commit 4905663933
283 changed files with 32074 additions and 15759 deletions

View File

@@ -1,23 +1,22 @@
#include <stdint.h>
#include "defines.h"
#include <string>
#include <stdint.h>
#include "psram.h"
#include "../../include/defines.h"
#define USE_SHARED_PSRAM_FOR_STBI
#ifdef USE_SHARED_PSRAM_FOR_STBI
#define STBI_MALLOC(sz) psram_reserve_shared_stbi_memory(sz)
#define STBI_REALLOC(p,newsz) psram_reallocate_shared_stbi_memory(p, newsz)
#define STBI_FREE(p) psram_free_shared_stbi_memory(p)
#define STBI_MALLOC(sz) psram_reserve_shared_stbi_memory(sz)
#define STBI_REALLOC(p, newsz) psram_reallocate_shared_stbi_memory(p, newsz)
#define STBI_FREE(p) psram_free_shared_stbi_memory(p)
#else // Use normal PSRAM
#define STBI_MALLOC(sz) malloc_psram_heap("STBI", sz, MALLOC_CAP_SPIRAM)
#define STBI_REALLOC(p,newsz) realloc_psram_heap("STBI", p, newsz, MALLOC_CAP_SPIRAM)
#define STBI_FREE(p) free_psram_heap("STBI", p)
#define STBI_MALLOC(sz) malloc_psram_heap("STBI", sz, MALLOC_CAP_SPIRAM)
#define STBI_REALLOC(p, newsz) realloc_psram_heap("STBI", p, newsz, MALLOC_CAP_SPIRAM)
#define STBI_FREE(p) free_psram_heap("STBI", p)
#endif
#define STB_IMAGE_IMPLEMENTATION
#include "../stb/stb_image.h"
@@ -25,4 +24,5 @@
#include "../stb/stb_image_write.h"
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#include "../stb/stb_image_resize.h"
// #include "../stb/deprecated/stb_image_resize.h"
#include "../stb/stb_image_resize.h"