It seems that this patch never made it into the pygame's repository. Can anyone fix it? Btw, we should remove unused 'if' condition check and 'else' code after that:
if1:...else:# Need to flip the image.surf=pygame.image.fromstring(abuffer,(width,height),"RGB",1)# swap it from a BGR surface to an RGB surface.r,g,b,a=surf.get_masks()surf.set_masks((b,g,r,a))r,g,b,a=surf.get_shifts()surf.set_shifts((b,g,r,a))returnsurf
'If' is unnecessary, because '1' is always True and 'else' never evaluates.