Commits

Anonymous committed fed4366

Misc. bug fixes from pygame.draw challenge compat testing

  • Participants
  • Parent commits 38b6018
  • Branches ctypes-soc

Comments (0)

Files changed (3)

File pygame/base.py

     success = 0
     fail = 0
 
-    SDL.SDL_Init(SDL.SDL_INIT_EVENTTHREAD | SDL.SDL_INIT_TIMER)
+    SDL.SDL_Init(SDL.SDL_INIT_EVENTTHREAD | \
+                 SDL.SDL_INIT_TIMER | \
+                 SDL.SDL_INIT_NOPARACHUTE) 
 
     if _video_autoinit():
         success += 1

File pygame/mixer.py

 
 from SDL import *
 from SDL.mixer import *
+from SDL.rwops import *
 
 import pygame.base
 
     while i < buffer:
         i <<= 1
     buffer = i
-
+    
+    global _endsound_callback
     if not SDL_WasInit(SDL_INIT_AUDIO):
         pygame.base.register_quit(_autoquit)
 
         _mixer_init_check()
 
         if hasattr(file, 'read'):
-            rw = SDL_RWopsFromObject(file)
+            rw = SDL_RWFromObject(file)
             # differ from Pygame, no freesrc here.
             self._chunk = Mix_LoadWAV_RW(rw, 0)
         else:
 
         channel = Channel(channelnum)
         channel._queue = None
-        channel._sound = None
+        channel._sound = self
         return channel
         
     def stop(self):

File pygame/rect.py

 
     def __setattr__(self, name, value):
         if name == 'top' or name == 'y':
-            self._r.y = value
+            self._r.y = int(value)
         elif name == 'left' or name == 'x':
             self._r.x = int(value)
         elif name == 'bottom':