Files
blastem/lib_stubs.c
WizzardSK f5b5835c83 libretro: make libblastem.so build and link again
`make libblastem.so` is broken at upstream tip on every architecture:

- vdp.c uses the threaded renderer (render_thread, render_create_thread),
  which render.h only declares for non-IS_LIB builds, so the core build dies
  on -Werror=implicit-function-declaration.
- laseractive.c uses free()/calloc() without <stdlib.h> and 32x_video.c uses
  memset()/memcpy() without <string.h>; GCC 14+ makes those hard errors.
- libblastem.c calls path_dirname()/basename_no_extension()/path_extension()
  without including paths.h.
- The emulation core calls scope_add_channel()/scope_add_sample() and
  upd_debugger(), which live in oscilloscope.o and debug.o. Neither is part
  of LIBOBJS, so the shared object links but fails to dlopen with undefined
  symbols. Added lib_stubs.c with no-op implementations for the core build.
- The lib build now defines DISABLE_NUKLEAR, since the libretro core has no
  nuklear UI; without it vdp.c pulls in debug_create_window() from the
  nuklear debug UI.
2026-07-27 19:05:51 +02:00

22 lines
529 B
C

/*
Stubs for the UI/debugger entry points that the emulation core calls, but whose
implementations live in objects that are not part of the libretro core build
(oscilloscope.o, debug.o and the render backends).
*/
#include "oscilloscope.h"
#include "upd78k2.h"
#include <stdint.h>
uint8_t scope_add_channel(oscilloscope *scope, const char *name, uint32_t sample_rate)
{
return 0;
}
void scope_add_sample(oscilloscope *scope, uint8_t channel, int16_t value, uint8_t trigger)
{
}
void upd_debugger(upd78k2_context *upd)
{
}