Add PushEvent hook on OS X

See #553
develop
lethosor 2015-02-21 14:39:31 -05:00
parent bd809d7bbc
commit 88ff51c755
2 changed files with 8 additions and 0 deletions

@ -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);

@ -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);