diff --git a/src/conio/sdlfuncs.c b/src/conio/sdlfuncs.c index d61880dc03914696e9aef5fee82f985a0200176a..d166ae172ee486401c3c5a295d28a5604aef95c9 100644 --- a/src/conio/sdlfuncs.c +++ b/src/conio/sdlfuncs.c @@ -52,6 +52,7 @@ int load_sdl_funcs(struct sdlfuncs *sdlf) sdlf->SetColors=SDL_SetColors; sdlf->BlitSurface=SDL_UpperBlit; sdlf->UpdateRects=SDL_UpdateRects; + sdlf->UpdateRect=SDL_UpdateRect; sdlf->SDL_CreateSemaphore=SDL_CreateSemaphore; sdlf->SDL_DestroySemaphore=SDL_DestroySemaphore; sdlf->SDL_CreateMutex=SDL_CreateMutex; @@ -164,6 +165,10 @@ int load_sdl_funcs(struct sdlfuncs *sdlf) FreeLibrary(sdl_dll); return(-1); } + if((sdlf->UpdateRect=(void *)GetProcAddress(sdl_dll, "SDL_UpdateRect"))==NULL) { + FreeLibrary(sdl_dll); + return(-1); + } if((sdlf->SDL_CreateSemaphore=(void *)GetProcAddress(sdl_dll, "SDL_CreateSemaphore"))==NULL) { FreeLibrary(sdl_dll); return(-1); @@ -357,6 +362,10 @@ int load_sdl_funcs(struct sdlfuncs *sdlf) dlclose(sdl_dll); return(-1); } + if((sdlf->UpdateRect=dlsym(sdl_dll, "SDL_UpdateRect"))==NULL) { + dlclose(sdl_dll); + return(-1); + } if((sdlf->SDL_CreateSemaphore=dlsym(sdl_dll, "SDL_CreateSemaphore"))==NULL) { dlclose(sdl_dll); return(-1); diff --git a/src/conio/sdlfuncs.h b/src/conio/sdlfuncs.h index 4424c95ab38bef4b1726d709ad3f9a535e724fd0..1499d237ad61c1ea2d4b3d72d87214349e9647a0 100644 --- a/src/conio/sdlfuncs.h +++ b/src/conio/sdlfuncs.h @@ -26,6 +26,7 @@ struct sdlfuncs { int (*BlitSurface) (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect); void (*UpdateRects) (SDL_Surface *screen, int numrects, SDL_Rect *rects); + void (*UpdateRect) (SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 h); SDL_sem *(*SDL_CreateSemaphore) (Uint32 initial_value); void (*SDL_DestroySemaphore) (SDL_sem *semaphore); SDL_mutex *(*SDL_CreateMutex) (void);