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

Re: [pygame] PATCH: display.c



On, Sun Mar 09, 2008, Lorenz Quack wrote:

> Hi folks,
> 
> I'm using pygame for my project and I'm quite happy with it. And now 
> finally the time has come that I can give something back :)
> 
> [quote SDL_SetVideoMode docs]
> As of SDL 1.2.10, if width and height are both 0, it will use the width and 
> height of the current video mode (or the desktop mode, if no mode has been 
> set).
> [/quote]
> 
> I was always missing this feature in pygame and now that I found out that 
> it is already available in SDL I thought it couldn't be too hard to do in 
> pygame... so here is my patch :)
> 
> with the ability to pass (0, 0) to display.set_mode I made it optional.
> So now pygame.display.set_mode() will create a window with the same 
> dimentions as your desktop.

I just commited a slightly modified version, that respects setting only
the width or height to 0. SDL supports this as well, so only the surface
width or height will be set according to the screen resolution.
Thanks a lot for the patch.

Regards
Marcus

Attachment: pgpPSXGAOPGM4.pgp
Description: PGP signature