Skip to content
Snippets Groups Projects
Commit 386f0a8a authored by deuce's avatar deuce
Browse files

Add UpdateRect()

parent 3039b335
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment