[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: pygame and wxPython under windows



Tim (mithro) Ansell wrote:

> I'm trying to use pygame inside a wxPython window. This works well under
> wxGTK, however when I do the same under windows it doesn't work.
>
> window = pyGame.display.set_mode(self.GetClientSizeTuple())
>
> Pygame Parachute Traceback:
> File "winSDL.py", line 56, in OnSize
>
> I've tried any value in the set_mode and it still crashes.

on windows you must use the 'windib' sdl backend, the 'directx' one tends to crash. use something like this before pygame.init()

if sys.platform == 'win32':
os.environ['SDL_VIDEODRIVER'] = 'windib'