Difference for arch/sdl/gr.c from version 1.3 to 1.4


version 1.3 version 1.4
Line 16
 
Line 16
 #include "args.h"  #include "args.h"
   
 int sdl_video_flags = SDL_SWSURFACE | SDL_HWPALETTE;  int sdl_video_flags = SDL_SWSURFACE | SDL_HWPALETTE;
   char checkvidmodeok=1;
 //end addition -MM  //end addition -MM
   
 SDL_Surface *screen;  SDL_Surface *screen;
Line 51
 
Line 52
   
 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   //added 05/19/99 Matt Mueller - locking stuff
Line 111
 
Line 113
 //edited 10/05/98 by Matt Mueller - make fullscreen mode optional  //edited 10/05/98 by Matt Mueller - make fullscreen mode optional
    // changed by adb on 980913: added SDL_HWPALETTE (should be option?)     // changed by adb on 980913: added SDL_HWPALETTE (should be option?)
         // changed by someone on 980923 to add SDL_FULLSCREEN          // changed by someone on 980923 to add SDL_FULLSCREEN
  if(SDL_VideoModeOK(w,h,8,sdl_video_flags)){   if(!checkvidmodeok || SDL_VideoModeOK(w,h,8,sdl_video_flags)){
    screen = SDL_SetVideoMode(w, h, 8, sdl_video_flags);     screen = SDL_SetVideoMode(w, h, 8, sdl_video_flags);
  } else {   } else {
    screen=NULL;     screen=NULL;
Line 150
 
Line 152
   
   
   
   int gr_check_fullscreen(void){
    return (sdl_video_flags & SDL_FULLSCREEN)?1:0;
   }
   int gr_toggle_fullscreen(void){
    sdl_video_flags^=SDL_FULLSCREEN;
    grd_curscreen->sc_mode=0;//hack to get it to reset screen mode
    return (sdl_video_flags & SDL_FULLSCREEN)?1:0;
   }
   
 int gr_init(int mode)  int gr_init(int mode)
 {  {
  int retcode;   int retcode;
Line 167
 
Line 178
  if (FindArg("-hwsurface"))   if (FindArg("-hwsurface"))
       sdl_video_flags|=SDL_HWSURFACE;        sdl_video_flags|=SDL_HWSURFACE;
  //end addition -MM   //end addition -MM
    if (FindArg("-nosdlvidmodecheck"))
    checkvidmodeok=0;
    
  // Set the mode.   // Set the mode.
  if ((retcode=gr_set_mode(mode)))   if ((retcode=gr_set_mode(mode)))

Legend:
line(s) removed in v.1.3 
line(s) changed
 line(s) added in v.1.4