From 386f0a8a44a6fabea50afac11f34268982292f51 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Wed, 10 Oct 2007 21:47:46 +0000 Subject: [PATCH] Add UpdateRect() --- src/conio/sdlfuncs.c | 9 +++++++++ src/conio/sdlfuncs.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/conio/sdlfuncs.c b/src/conio/sdlfuncs.c index d61880dc03..d166ae172e 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 4424c95ab3..1499d237ad 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); -- GitLab