/*
 * img_compat.h — SDL3_image shim.
 *
 * On native builds, this is just a passthrough to <SDL3_image/SDL_image.h>.
 * On Emscripten there is no SDL3_image port yet (only sdl3 and sdl3_ttf), so
 * we provide an IMG_Load implementation backed by the libpng port. Only PNG
 * decoding is needed — Kobo Deluxe's assets are all .png.
 */
#ifndef KOBO_IMG_COMPAT_H
#define KOBO_IMG_COMPAT_H

#ifdef __EMSCRIPTEN__

#include <SDL3/SDL.h>

#ifdef __cplusplus
extern "C" {
#endif

SDL_Surface *IMG_Load(const char *file);

#ifdef __cplusplus
}
#endif

#else  /* native */

#include <SDL3_image/SDL_image.h>

#endif

#endif /* KOBO_IMG_COMPAT_H */
