version 1.1 | | version 1.2 |
---|
| | |
| | |
int gr_installed = 0; | | int gr_installed = 0; |
| | |
| | //added 05/19/99 Matt Mueller - locking stuff |
| | #ifdef GR_LOCK |
| | #include "checker.h" |
| | #ifdef TEST_GR_LOCK |
| | int gr_testlocklevel=0; |
| | #endif |
| | inline void gr_dolock(const char *file,int line) { |
| | gr_dotestlock(); |
| | if ( gr_testlocklevel==1 && SDL_MUSTLOCK(screen) ) { |
| | #ifdef __CHECKER__ |
| | chcksetwritable(screen.pixels,screen->w*screen->h*screen->format->BytesPerPixel); |
| | #endif |
| | if ( SDL_LockSurface(screen) < 0 )Error("could not lock screen (%s:%i)\n",file,line); |
| | } |
| | } |
| | inline void gr_dounlock(void) { |
| | gr_dotestunlock(); |
| | if (gr_testlocklevel==0 && SDL_MUSTLOCK(screen) ) { |
| | SDL_UnlockSurface(screen); |
| | #ifdef __CHECKER__ |
| | chcksetunwritable(screen.pixels,screen->w*screen->h*screen->format->BytesPerPixel); |
| | #endif |
| | } |
| | } |
| | #endif |
| | //end addition -MM |
| | |
void gr_palette_clear(); // Function prototype for gr_init; | | void gr_palette_clear(); // Function prototype for gr_init; |
| | |
void gr_update() | | void gr_update() |
{ | | { |
| | //added 05/19/99 Matt Mueller - locking stuff |
| | gr_testunlock(); |
| | //end addition -MM |
SDL_UpdateRect(screen,0,0,0,0); | | SDL_UpdateRect(screen,0,0,0,0); |
} | | } |
| | |
| | |
if (FindArg("-fullscreen")) | | if (FindArg("-fullscreen")) |
sdl_video_flags|=SDL_FULLSCREEN; | | sdl_video_flags|=SDL_FULLSCREEN; |
//end addition -MM | | //end addition -MM |
| | //added 05/19/99 Matt Mueller - make HW surface optional |
| | if (FindArg("-hwsurface")) |
| | sdl_video_flags|=SDL_HWSURFACE; |
| | //end addition -MM |
| | |
// Set the mode. | | // Set the mode. |
if ((retcode=gr_set_mode(mode))) | | if ((retcode=gr_set_mode(mode))) |