paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.2,1.10.2.3


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.2,1.10.2.3
Date: Wed, 26 Jun 2002 04:47:53 -0400

Update of /cvsroot/paragui/paragui/src/core
In directory subversions:/tmp/cvs-serv7234/src/core

Modified Files:
      Tag: devel-opengl
        pgapplication.cpp 
Log Message:
Initial OpenGL drawable creation
added a simple OpenGL test based on 'list'
abstracted mouse management functions - solved "mouse cursor not moving" 
problem which was based on a zero-width and height mouse rectangle.


Index: pgapplication.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgapplication.cpp,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -C2 -r1.10.2.2 -r1.10.2.3
*** pgapplication.cpp   26 Jun 2002 03:25:04 -0000      1.10.2.2
--- pgapplication.cpp   26 Jun 2002 08:47:51 -0000      1.10.2.3
***************
*** 193,200 ****
        while(!my_quitEventLoop) {
                
                // pull motion events (may flood the eventqueue)
                while(SDL_PeepEvents(&event, 1, SDL_GETEVENT, 
SDL_MOUSEMOTIONMASK) > 0)
                        ;
!               
                if(enableAppIdleCalls) {
                        if (SDL_PollEvent(&event) == 0) {
--- 193,203 ----
        while(!my_quitEventLoop) {
                
+ #if 1
                // pull motion events (may flood the eventqueue)
                while(SDL_PeepEvents(&event, 1, SDL_GETEVENT, 
SDL_MOUSEMOTIONMASK) > 0)
                        ;
! #else
!               SDL_Delay(0);
! #endif
                if(enableAppIdleCalls) {
                        if (SDL_PollEvent(&event) == 0) {
***************
*** 236,245 ****
                return;
        }
!       if(SDL_ShowCursor(SDL_QUERY) == SDL_ENABLE) {
                // Hide hardware cursor if visible
!               SDL_ShowCursor(SDL_DISABLE);
        }
        //SDL_PumpEvents();
!       SDL_GetMouseState(&x, &y);
        saved = my_mouse_position;
        if(!GetBulkMode()) {
--- 239,248 ----
                return;
        }
!       if(drawable->ShowCursor(SDL_QUERY) == SDL_ENABLE) {
                // Hide hardware cursor if visible
!               drawable->ShowCursor(SDL_DISABLE);
        }
        //SDL_PumpEvents();
!       drawable->GetMouseState(&x, &y);
        saved = my_mouse_position;
        if(!GetBulkMode()) {
***************
*** 310,314 ****
                ClearOldMousePosition();
                drawable->UpdateRects(1, &my_mouse_position);
!               SDL_ShowCursor(SDL_ENABLE);
                return;
        }
--- 313,317 ----
                ClearOldMousePosition();
                drawable->UpdateRects(1, &my_mouse_position);
!               drawable->ShowCursor(SDL_ENABLE);
                return;
        }
***************
*** 320,323 ****
--- 323,328 ----
        }
        image->getScreen()->refcount++;
+       my_mouse_position.my_width  = my_mouse_pointer->getWidth();
+       my_mouse_position.my_height = my_mouse_pointer->getHeight();
        DrawCursor();
  }
***************
*** 326,333 ****
        switch(mode) {
                case PG_CURSOR_NONE:
!                       SDL_ShowCursor(SDL_DISABLE);
                        break;
                case PG_CURSOR_HARDWARE:
!                       SDL_ShowCursor(SDL_ENABLE);
                        break;
                case PG_CURSOR_SOFTWARE:
--- 331,338 ----
        switch(mode) {
                case PG_CURSOR_NONE:
!                       drawable->ShowCursor(SDL_DISABLE);
                        break;
                case PG_CURSOR_HARDWARE:
!                       drawable->ShowCursor(SDL_ENABLE);
                        break;
                case PG_CURSOR_SOFTWARE:
***************
*** 643,647 ****
                UnloadSurface(my_mouse_pointer);
                my_mouse_pointer = 0;
!               SDL_ShowCursor(SDL_ENABLE);
        }
  
--- 648,652 ----
                UnloadSurface(my_mouse_pointer);
                my_mouse_pointer = 0;
!               drawable->ShowCursor(SDL_ENABLE);
        }
  




reply via email to

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