OSDir


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

FULLSCREEN and DOUBLEBUF


On 09/06/18 20:31, Paul St George wrote:
> 
>  ??? print pygame.display.get_surface()
> gives
> <Surface(720x480x32 SW)>
> 
> and
>  ??? print screen.get_flags()
> gives
> -2147483648
> 
> The lists of flags at 
> <https://www.pygame.org/docs/ref/surface.html#pygame.Surface.get_flags> 
> and 
> <http://www.rpi.edu/dept/acm/packages/SDL/1.2.6/include/SDL/SDL_video.h>
> 
> has nothing remotely like -2147483648. I would expect something more 
> like 0x40000000
> 
> Am I using the wrong code to determine whether I have successfully set 
> DOUBLEBUF with
> 
>  ??? screen = pygame.display.set_mode((720,480), pygame.FULLSCREEN | 
> pygame.DOUBLEBUF)
> 
> AND
> 
> What does -2147483648 tell me? Does this number need converting?
>>

 From the interactive interpreter:-

 >>> hex(-2147483648)
'-0x80000000'
 >>> hex(pygame.FULLSCREEN)
'-0x80000000'
 >>> hex(pygame.DOUBLEBUF)
'0x40000000'

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence