Skip to content
Snippets Groups Projects
Commit 1228dba6 authored by deuce's avatar deuce
Browse files

Add SDL_Flip and fix a couple wranings.

parent 292d2259
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,7 @@ int load_sdl_funcs(struct sdlfuncs *sdlf)
sdlf->LockSurface=SDL_LockSurface;
sdlf->UnlockSurface=SDL_UnlockSurface;
sdlf->DisplayFormat=SDL_DisplayFormat;
sdlf->Flip=SDL_Flip;
sdlf->gotfuncs=1;
sdl_funcs_loaded=1;
return(0);
......@@ -285,6 +286,10 @@ int load_sdl_funcs(struct sdlfuncs *sdlf)
FreeLibrary(sdl_dll);
return(-1);
}
if((sdlf->Flip=(void *)GetProcAddress(sdl_dll, "SDL_Flip"))==NULL) {
FreeLibrary(sdl_dll);
return(-1);
}
sdlf->gotfuncs=1;
sdl_funcs_loaded=1;
return(0);
......@@ -482,6 +487,10 @@ int load_sdl_funcs(struct sdlfuncs *sdlf)
dlclose(sdl_dll);
return(-1);
}
if((sdlf->Flip=dlsym(sdl_dll, "SDL_Flip"))==NULL) {
dlclose(sdl_dll);
return(-1);
}
sdlf->gotfuncs=1;
sdl_funcs_loaded=1;
return(0);
......@@ -546,8 +555,6 @@ int main(int argc, char **argv, char **env)
int SDL_main_env(int argc, char **argv, char **env)
#endif
{
unsigned int i;
SDL_Event ev;
char drivername[64];
struct main_args ma;
SDL_Thread *main_thread;
......
......@@ -56,6 +56,7 @@ struct sdlfuncs {
int (*LockSurface) (SDL_Surface *surface);
void (*UnlockSurface) (SDL_Surface *surface);
SDL_Surface *(*DisplayFormat)(SDL_Surface *surf);
int (*Flip) (SDL_Surface *surface);
int gotfuncs;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment