Skip to content

Commit

Permalink
Remove tsdl_nop from the stubs, it's no longer needed (#96).
Browse files Browse the repository at this point in the history
Because we have a regular stub to SDL_LogMessage anyways now.
  • Loading branch information
dbuenzli committed Oct 16, 2024
1 parent 1fb1249 commit c7af97c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/tsdl_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@
#include "SDL.h"
#include <caml/mlvalues.h>

#ifdef _MSC_VER
/* MSVC requires at least one extern function from SDL2 to be used.
If not, MSVC will not link the SDL2 import library and subsequently the
SDL2 DLL will not be implicitly linked (aka. load-time dynamic linking)
to the TSDL stub DLL. That can be verified with Unix `ldd` or MSVC
`dumpbin /imports`.
ctypes-foreign, in particular ctypes_win32_dlsym_rtld_default(), requires
that all foreign DLLs are already mapped into the process address space.
Implicit linking is the simplest way to do that.
*/
void tsdl_nop (void) { SDL_WasInit(0); return; }
#else
void tsdl_nop (void) { return; }
#endif

CAMLprim value ocaml_tsdl_log_message (value c, value p, value m)
{
/* XXX we assume users know what they are logging and
Expand Down

0 comments on commit c7af97c

Please sign in to comment.