enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src video.cc,1.10,1.11


From: Ralf Westram <address@hidden>
Subject: [Enigma-cvs] enigma/src video.cc,1.10,1.11
Date: Mon, 27 Oct 2003 11:51:20 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv12659/src

Modified Files:
        video.cc 
Log Message:
- creates directories for screenshots



Index: video.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/video.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** video.cc    23 Oct 2003 10:01:19 -0000      1.10
--- video.cc    27 Oct 2003 11:51:17 -0000      1.11
***************
*** 426,430 ****
      Screen *scr = GetScreen();
      GC scrgc(scr->get_surface());
!         
      while (rest_time > 0)
      {
--- 426,430 ----
      Screen *scr = GetScreen();
      GC scrgc(scr->get_surface());
! 
      while (rest_time > 0)
      {
***************
*** 531,534 ****
--- 531,541 ----
  void video::Screenshot(const char *fname) {
      SDL_Surface *s = GetScreen()->get_surface()->get_surface();
+ 
+     // auto-create the directory if necessary
+     string directory;
+     if (px::split_path(fname, &directory, 0) && 
!px::sysdep::FolderExists(directory)) {
+         px::sysdep::FolderCreate(directory);
+     }
+ 
      SDL_SaveBMP(s, fname);
      enigma::Log << "screenshot: "<<s->w << "x"<<s->h<<endl;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]