From 8a68ffacc4ddb08ced819e9769f76e8621ba932b Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sun, 8 Feb 2015 14:42:14 +0000 Subject: [PATCH] Add PollEvent --- src/conio/sdlfuncs.c | 4 ++++ src/conio/sdlfuncs.h | 1 + src/xpdev/sdlfuncs.c | 4 ++++ src/xpdev/sdlfuncs.h | 1 + 4 files changed, 10 insertions(+) diff --git a/src/conio/sdlfuncs.c b/src/conio/sdlfuncs.c index 1966b142a4..9d334601e4 100644 --- a/src/conio/sdlfuncs.c +++ b/src/conio/sdlfuncs.c @@ -151,6 +151,10 @@ int load_sdl_funcs(struct sdlfuncs *sdlf) xp_dlclose(sdl_dll); return(-1); } + if((sdlf->PollEvent=xp_dlsym(sdl_dll, SDL_PollEvent))==NULL) { + xp_dlclose(sdl_dll); + return(-1); + } if((sdlf->SetVideoMode=xp_dlsym(sdl_dll, SDL_SetVideoMode))==NULL) { xp_dlclose(sdl_dll); return(-1); diff --git a/src/conio/sdlfuncs.h b/src/conio/sdlfuncs.h index ad51141ea0..384c14ec06 100644 --- a/src/conio/sdlfuncs.h +++ b/src/conio/sdlfuncs.h @@ -41,6 +41,7 @@ struct sdlfuncs { void (HACK_HACK_HACK *KillThread) (SDL_Thread *thread); void (HACK_HACK_HACK *WaitThread) (SDL_Thread *thread, int *status); int (HACK_HACK_HACK *WaitEvent) (SDL_Event *event); + int (HACK_HACK_HACK *PollEvent) (SDL_Event *event); SDL_Surface *(HACK_HACK_HACK *SetVideoMode) (int width, int height, int bpp, Uint32 flags); void (HACK_HACK_HACK *FreeSurface) (SDL_Surface *surface); void (HACK_HACK_HACK *WM_SetCaption) (const char *title, const char *icon); diff --git a/src/xpdev/sdlfuncs.c b/src/xpdev/sdlfuncs.c index dd8b851611..7da02038b8 100644 --- a/src/xpdev/sdlfuncs.c +++ b/src/xpdev/sdlfuncs.c @@ -146,6 +146,10 @@ int load_sdl_funcs(struct sdlfuncs *sdlf) xp_dlclose(sdl_dll); return(-1); } + if((sdlf->PollEvent=xp_dlsym(sdl_dll, SDL_PollEvent))==NULL) { + xp_dlclose(sdl_dll); + return(-1); + } if((sdlf->SetVideoMode=xp_dlsym(sdl_dll, SDL_SetVideoMode))==NULL) { xp_dlclose(sdl_dll); return(-1); diff --git a/src/xpdev/sdlfuncs.h b/src/xpdev/sdlfuncs.h index b8ba1e1734..ceaaec5fd3 100644 --- a/src/xpdev/sdlfuncs.h +++ b/src/xpdev/sdlfuncs.h @@ -35,6 +35,7 @@ struct sdlfuncs { void (*KillThread) (SDL_Thread *thread); void (*WaitThread) (SDL_Thread *thread, int *status); int (*WaitEvent) (SDL_Event *event); + int (*PollEvent) (SDL_Event *event); SDL_Surface *(*SetVideoMode) (int width, int height, int bpp, Uint32 flags); void (*FreeSurface) (SDL_Surface *surface); void (*WM_SetCaption) (const char *title, const char *icon); -- GitLab