paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/plugins/mpeg pgmpeg-test.cc,1.1.2.2,1.1.2.3


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/plugins/mpeg pgmpeg-test.cc,1.1.2.2,1.1.2.3
Date: Thu, 27 Feb 2003 15:42:46 -0500

Update of /cvsroot/paragui/paragui/plugins/mpeg
In directory subversions:/tmp/cvs-serv26712/plugins/mpeg

Modified Files:
      Tag: devel-opengl
        pgmpeg-test.cc 
Log Message:
just some minor updates


Index: pgmpeg-test.cc
===================================================================
RCS file: /cvsroot/paragui/paragui/plugins/mpeg/Attic/pgmpeg-test.cc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** pgmpeg-test.cc      3 Feb 2003 16:39:59 -0000       1.1.2.2
--- pgmpeg-test.cc      27 Feb 2003 20:42:44 -0000      1.1.2.3
***************
*** 1,2 ****
--- 1,4 ----
+ #define BULKMODE
+ 
  #include "pgmpeg2.hh"
  #include "pgbutton.h"
***************
*** 368,371 ****
--- 370,376 ----
          }
  
+ #ifdef BULKMODE
+       app.SetBulkMode(true);
+ #endif
        if(!app.LoadTheme("default")) {
                  printf("Unable to load theme!\n");
***************
*** 453,457 ****
--- 458,504 ----
  
        // thePlayer->SendToBack();
+ #ifndef BULKMODE
        app.Run();
+ #else
+       int done = 0;
+       SDL_Event event;
+ 
+       while ( !done ) {
+               /* Check for events */
+         while ( SDL_PollEvent(&event) ) {
+           switch (event.type) {
+           /*
+           case SDL_KEYDOWN:
+             // Any keypress quits the app...
+           */
+           case SDL_QUIT:
+             done = 1;
+             break;
+           default:
+             break;
+           }
+           app.PumpIntoEventQueue(&event);
+         }
+         PG_Widget::BulkBlit();
+ 
+ #if 1
+         /* working method */
+         PG_Application::GetDrawingEnvironment()->Flip();
+ #else
+         /* Update the screen! */
+         if ( (screen->GetSDLFlags() & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) {
+           PG_Application::GetDrawingEnvironment()->Flip();
+         } else {
+           PG_Rect r;
+           screen->UpdateRects(1, &r);
+           // PG_Application::GetDrawingEnvironment()->Flip();
+           //SDL_UpdateRects(screen, nupdates, sprite_rects);
+           // glFlush();       /* Just in case. *heh* */
+           // SDL_GL_SwapBuffers();
+           // glFinish();      /* And here we kill parallel execution... :-( */
+         }
+ #endif
+       }
+ #endif
          return EXIT_SUCCESS;
  }





reply via email to

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