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

Re: [pygame] Controlling Display Location on screen



On Thu, 18 Dec 2008 07:44:21 -0800, "Lin Parkh" <lparkh@xxxxxxxxxxx> wrote:
> Is it possible to set where on the monitor the display will appear? For
> example I would like the pygame display to appear on a second monitor I
> have. I see how to control resolution and size but not this. I am using
> windows btw,

There was a command to center the SDL window, but in a recent version of
Pygame this command just didn't work. The window would appear in a random
place, often hanging over the screen's edge so that the program couldn't be
properly used until the window is moved. I'm not sure whether the problem's
been fixed yet.

I think you need to "import os" and then set an environment flag
("os.setenv"?), and that the flag is "SDL_VIDEO_CENTER", in quotes.