adonthell-commits
[Top][All Lists]
Advanced

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

[Adonthell-commits] CVS: adonthell/test gfxtest.py, 1.1, 1.2 inputtest.c


From: Alexandre Courbot <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/test gfxtest.py, 1.1, 1.2 inputtest.cc, 1.2, 1.3
Date: Mon, 28 Jul 2003 11:02:21 -0400

Update of /cvsroot/adonthell/adonthell/test
In directory subversions:/tmp/cvs-serv17798/test

Modified Files:
        gfxtest.py inputtest.cc 
Log Message:
FIXED Memory leak in the python callbacks
FIXED Uncatched errors in the python callbacks
REMOVED stupid debugging messages in surface_sdl::draw_line
CHANGED input callbacks to return booleans instead of integers


Index: gfxtest.py
===================================================================
RCS file: /cvsroot/adonthell/adonthell/test/gfxtest.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** gfxtest.py  27 Jul 2003 14:08:21 -0000      1.1
--- gfxtest.py  28 Jul 2003 15:02:19 -0000      1.2
***************
*** 6,15 ****
      def key_callback(ev):
          global letsexit
-         print "In callback!"
          if ev.type() == input.keyboard_event.KEY_PUSHED:
              if ev.key() == input.keyboard_event.ESCAPE_KEY: letsexit = 1
  
      if not gfx.init("sdl"): raise "Can't load gfx backend!"
!     if not input.init("sdl"): raise " Can't load input backend!"
  
      gfx.screen.set_video_mode(640, 480)
--- 6,15 ----
      def key_callback(ev):
          global letsexit
          if ev.type() == input.keyboard_event.KEY_PUSHED:
              if ev.key() == input.keyboard_event.ESCAPE_KEY: letsexit = 1
+         return 1
  
      if not gfx.init("sdl"): raise "Can't load gfx backend!"
!     if not input.init("sdl"): raise "Can't load input backend!"
  
      gfx.screen.set_video_mode(640, 480)

Index: inputtest.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/test/inputtest.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** inputtest.cc        27 Jul 2003 14:08:21 -0000      1.2
--- inputtest.cc        28 Jul 2003 15:02:19 -0000      1.3
***************
*** 15,19 ****
      // and is supposed to return nonzero if it took the
      // event.
!     int handle_keys(input::keyboard_event * ev)
      {
          // If the key is released
--- 15,19 ----
      // and is supposed to return nonzero if it took the
      // event.
!     bool handle_keys(input::keyboard_event * ev)
      {
          // If the key is released
***************
*** 36,40 ****
              }
          }
!         return 1;
      }
  };
--- 36,40 ----
              }
          }
!         return true;
      }
  };





reply via email to

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