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

Re: [pygame] Picking monitor...



On Sun, 30 Aug 2009, Brian Fisher wrote:

On Fri, Aug 28, 2009 at 10:08 AM, Gene Buckle <geneb@xxxxxxxxxxxxx> wrote:

The main issue is that the avionics computer will have more than a couple
of these USB video adapters.  Is it possible to discover the current window
position from within pygame?  That would allow me to manually position the
window and then "save" the current position as the start position.

Hey Gene,
  stuff like that is always possible - and ctypes is usually the best way
to do little hack stuff like this in python.

For getting the window pos, the function "pygame.display_get_info" gives you
a dictionary with "window" set the HWND of your window, and the OS function
"GetWindowRect" can be called on that HWND to get the window position/size


Thanks for that Brian! I found out I had another problem on Friday. It seems that OpenGL isn't working in a window on my auxillary adapters. The scene is frozen and just smears as I move the window around. I think I'm pretty much SOL until the 1.3 version of SDL comes out. My only other choice is DirectX and I really don't want to have to go there if I don't have to.

Thanks!

g.


--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://www.scarletdme.org - Get it _today_!