diff --git a/library/Hooks-darwin.cpp b/library/Hooks-darwin.cpp index c5e04366d..1faed524f 100644 --- a/library/Hooks-darwin.cpp +++ b/library/Hooks-darwin.cpp @@ -108,6 +108,12 @@ DFhackCExport int DFH_SDL_PollEvent(SDL::Event* event) return orig_return; } +static int (*_SDL_PushEvent)(SDL::Event* event) = 0; +DFhackCExport int SDL_PushEvent(SDL::Event* event) +{ + return _SDL_PushEvent(event); +} + struct WINDOW; DFhackCExport int wgetch(WINDOW *win) { @@ -264,6 +270,7 @@ DFhackCExport int DFH_SDL_Init(uint32_t flags) bind(SDL_Init); bind(SDL_Quit); bind(SDL_PollEvent); + bind(SDL_PushEvent); bind(SDL_UpperBlit); bind(SDL_CreateRGBSurface); diff --git a/library/include/Hooks.h b/library/include/Hooks.h index 70093bea9..06e7cd8d3 100644 --- a/library/include/Hooks.h +++ b/library/include/Hooks.h @@ -56,6 +56,7 @@ DFhackCExport int DFH_SDL_Init(uint32_t flags); DFhackCExport int SDL_NumJoysticks(void); DFhackCExport void SDL_Quit(void); DFhackCExport int SDL_PollEvent(SDL::Event* event); +DFhackCExport int SDL_PushEvent(SDL::Event* event); DFhackCExport int SDL_Init(uint32_t flags); DFhackCExport int wgetch(WINDOW * win);