/[usata]/usata2/src/system.cpp
ViewVC logotype

Diff of /usata2/src/system.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by skunix, Sun Dec 26 08:03:34 2004 UTC revision 1.10 by skunix, Sun Dec 26 09:35:23 2004 UTC
# Line 12  Line 12 
12  //  //
13  // $Id$  // $Id$
14  // $Log$  // $Log$
15    // Revision 1.10  2004/12/26 09:35:23  skunix
16    // use logging functionality
17    //
18  // Revision 1.9  2004/12/26 08:03:34  skunix  // Revision 1.9  2004/12/26 08:03:34  skunix
19  // changed lambda::bind's to boost::binds  // changed lambda::bind's to boost::binds
20  //  //
# Line 30  Line 33 
33  #include <SDL.h>  #include <SDL.h>
34  #include <stdexcept>  #include <stdexcept>
35  #include <algorithm>  #include <algorithm>
 #include <iostream>  
36  #include <GL/glew.h>  #include <GL/glew.h>
37  #include "log.hpp"  #include "log.hpp"
38  namespace usata  namespace usata
# Line 132  namespace system Line 134  namespace system
134          {          {
135                  Uint32 Flags = SDL_OPENGL | (vm.fullscreen?SDL_FULLSCREEN:0);                  Uint32 Flags = SDL_OPENGL | (vm.fullscreen?SDL_FULLSCREEN:0);
136                  const SDL_VideoInfo* vi = SDL_GetVideoInfo();                  const SDL_VideoInfo* vi = SDL_GetVideoInfo();
137                    log::Stream2 logstream;
                 std::cout << vi->video_mem << "k video ram" << std::endl;  
138    
139                  int depth = vi->vfmt->BitsPerPixel;                  int depth = vi->vfmt->BitsPerPixel;
140    
# Line 142  namespace system Line 143  namespace system
143                  if (success)                  if (success)
144                  {                  {
145                          SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE,&depth);                          SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE,&depth);
146                          std::cout << "set video mode ok, GL_DEPTH_SIZE (" << depth <<")" << std::endl;                          logstream << "set video mode ok, GL_DEPTH_SIZE (" << depth <<")" << log::Commit;
147                          init_glew();                          init_glew();
148                  }                  }
149                  else                  else
150                  {                  {
151                          std::cerr << SDL_GetError() << std::endl;                          logstream << log::set_level(log::Level::ERROR) << SDL_GetError() << log::Commit;
152                  }                  }
153    
154          }          }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26