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

Re: [pygame] another strange crash (actually...)



hi,

that sucks :(

Try putting this at the top:

import os
os.environ['SDL_VIDEODRIVER']='windib'

Just to make sure you've got the right thing in there.

Otherwise... have you tried looking for updated video drivers?


cheers,




On Wed, Aug 27, 2008 at 10:07 AM, Emmanuel Kanter
<emikanter@xxxxxxxxxxxx> wrote:
> Dear pythonians,
>
> I were writing the Beginning Game Dev exercice, again (cahem), with the set
> SDL_VIDEODRIVER=windib thing typed up just before, and, after setting up a
> few points and strange polygons, my PC just stopped doing anything. It
> froze! No input, output didn't change. I don't know what the problem is, it
> didn't reset or anything, and I had just played F.E.A.R. on this same
> computer, so it should be working fine... I don't know what to do. There
> must be a bug, or something very specific going on...
>
> The code is as follows:
>
> import pygame
> from pygame.locals import *
> from sys import exit
>
> pygame.init()
> screen = pygame.display.set_mode((640, 480), 0, 32)
>
> points = []
>
> while True:
>   for event in pygame.event.get():
>       if event.type==QUIT:
>           exit()
>       if event.type==MOUSEBUTTONDOWN:
>           points.append(event.pos)
>     screen.fill((255,255,255))
>   if len(points) >= 3:
>       pygame.draw.polygon(screen, (0,255,0), points)
>   for point in points:
>       pygame.draw.circle(screen, (0,0,255), point, 5)
>     pygame.display.update()
>
> Thanks for your help!
> Emmanuel
>