23 May '13 - 11:41 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Window position (dual-screen configuration)  (Read 3689 times)
Yandros
Posts: 13


« on: 4 Sep '04 - 15:50 »
Reply with quoteQuote

First of all please don't blame me if this topic has already been discussed - actually I searched the forum but did not find anything really specific to this topic...  Roll Eyes

Position and size of XMPlay's windows is saved when closing them - great feature, no doubt.

Using a dual-screen configuration, the sad thing is: this only works on my primary monitor. So setting up XMPlay on the secondary monitor (where I prefer XMPlay to rest) is useless, as after restarting XMPlay it shows up on the primary monitor again...  Sad

I am just curious if this is os-/driver-dependent or if it could be fixed within XMPlay?  Huh

Is anybody else experiencing this behavior?
Does it work on someone's secondary monitor?

Thanks for your feedback!

Yandros
Logged
Greebo
Posts: 59


« Reply #1 on: 4 Sep '04 - 15:53 »
Reply with quoteQuote

Aye, it won't save the secondary monitor position on my setup.
Logged
Dotpitch
Posts: 2473


« Reply #2 on: 4 Sep '04 - 19:44 »
Reply with quoteQuote

xmplay stores it's last position in the registry (HKCU\Software\Un4seen Developments\XMPlay2, WindowX and WindowY). if these values are on the primary monitor, then i think xmplay writes the wrong resolution (it count from the top left of the second screen instead of the first). can't try it myself, i've got only one monitor Undecided.
Logged
Yandros
Posts: 13


« Reply #3 on: 4 Sep '04 - 21:20 »
Reply with quoteQuote

xmplay stores it's last position in the registry (HKCU\Software\Un4seen Developments\XMPlay2, WindowX and WindowY). if these values are on the primary monitor, then i think xmplay writes the wrong resolution (it count from the top left of the second screen instead of the first). can't try it myself, i've got only one monitor Undecided.

Hi Dotpitch!

Thx for the registry hint.

Just played around a bit and discovered the following X,Y-values were stored when closing xmplay while located in the topleft corner of each screen:

PRIMARY
SECONDARY
WindowX| 0x00000000 (0)| 0xfffffc00 (4294966272)|
WindowY| 0x00000000 (0)| 0x00000000 (0)|

Probably should show my monitor arrangement...  Wink

+-+ +-+
|S| |P|
+-+ +-+


Launching xmplay with the SECONDARY values stored in registry, it just settles itself at 0,0 - i.e. topleft corner of primary screen.  Sad

Compared to another app also storing X,Y in the registry, the values seem to be correct, because the other app restores correctly where it was before, regardless on which screen...

Appears to be a problem of xmplay not handling those values correctly... what do u think?
Logged
Dotpitch
Posts: 2473


« Reply #4 on: 4 Sep '04 - 21:34 »
Reply with quoteQuote

well, it stores the the values right, but it reads them wrong...small mistake Undecided. looks like xmplay is trying to place itself at [0,4294966272], but it can't find that (it's off the first screen, so the value "must" be corrupt, or something) and opens at standard 0,0.
btw, i don't think it's weird it does that, cause 4294966272 is a pixel that would be (at least, on my screen) 1342 km away...i'd expect something like [0,1025] with two 1024x768 screens, but i don't know how your windows reacts on a secondary screen. xmplay doesn't like it, that's for sure Wink
Logged
Torkell
Posts: 1154


« Reply #5 on: 4 Sep '04 - 21:38 »
Reply with quoteQuote

I've noticed that XMPlay dislikes multiple monitors, tho it affects people who have the secondary with negative co-ordinates more...

You can either use EnumDisplayMonitors and GetMonitorInfo, or GetSystemMetrics with SM_C?VIRTUALSCREEN. Bear in mind that these APIs and parameters have only been around since 98 and 2k, but you can use a stub header (multimon.h) that does sensible things on 95 etc.
Logged
Torkell
Posts: 1154


« Reply #6 on: 4 Sep '04 - 21:39 »
Reply with quoteQuote

&hFFFFFC00 = -1024

Not everything uses unsigned ints, folks Grin
Logged
Dotpitch
Posts: 2473


« Reply #7 on: 4 Sep '04 - 21:55 »
Reply with quoteQuote

 Shocked didn't know that Boggy! but why doesn't xmplay realise that?
« Last Edit: 4 Sep '04 - 21:57 by Dotpitch » Logged
Yandros
Posts: 13


« Reply #8 on: 5 Sep '04 - 09:06 »
Reply with quoteQuote

&hFFFFFC00 = -1024

Not everything uses unsigned ints, folks Grin

Regarding my monitor arrangement (both screens running at 1024x768) this value seems to make sense... (thx for that hint BoggyB Wink)

Given the upper left corner of the primary screen is position 0,0 the upper left corner of my secondary screen located left of primary (see above) would logically be -1024,0. Grin

So maybe xmplay just does not expect negative coords or treats them incorrectly...  Sad Huh

Will try to swap screens and see if it works the other way round...
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #9 on: 5 Sep '04 - 13:04 »
Reply with quoteQuote

When XMPlay is loaded, it checks that the stored window position is within bounds of the display. So that if the user has changed the resolution since the last time XMPlay was loaded (for example), XMPlay won't be off the screen.

I've never tried XMPlay on a multi-monitor setup, so it doesn't take that into account in it's boundary checks... guess I'll have to give it a go some time Smiley
Logged
Torkell
Posts: 1154


« Reply #10 on: 5 Sep '04 - 13:08 »
Reply with quoteQuote

When XMPlay is loaded, it checks that the stored window position is within bounds of the display. So that if the user has changed the resolution since the last time XMPlay was loaded (for example), XMPlay won't be off the screen.

I've never tried XMPlay on a multi-monitor setup, so it doesn't take that into account in it's boundary checks... guess I'll have to give it a go some time Smiley
I'd suggest using GetSystemMetrics, as that way if it's running on 95/NT you just feed it different parameters. That'd work for screen resolution changes, but it wouldn't handle irregular shapes (two screens at different resolutions would have some dead space). To cope with that, you'd need EnumDisplayMonitors and GetMonitorInfo.

I'll happily test any multimonitor versions, as I've got a dual-display setup.
Logged
Torkell
Posts: 1154


« Reply #11 on: 5 Sep '04 - 13:09 »
Reply with quoteQuote

Shocked didn't know that Boggy! but why doesn't xmplay realise that?
'cause it's -1024 Grin
Logged
Yandros
Posts: 13


« Reply #12 on: 5 Sep '04 - 15:32 »
Reply with quoteQuote

When XMPlay is loaded, it checks that the stored window position is within bounds of the display. So that if the user has changed the resolution since the last time XMPlay was loaded (for example), XMPlay won't be off the screen.

I've never tried XMPlay on a multi-monitor setup, so it doesn't take that into account in it's boundary checks... guess I'll have to give it a go some time Smiley

Thanks for clarifying that one. Cheesy


I'd suggest using GetSystemMetrics, as that way if it's running on 95/NT you just feed it different parameters. That'd work for screen resolution changes, but it wouldn't handle irregular shapes (two screens at different resolutions would have some dead space). To cope with that, you'd need EnumDisplayMonitors and GetMonitorInfo.

I'll happily test any multimonitor versions, as I've got a dual-display setup.

I would also willingly assist in testing new boundary checks - just let me know...  Smiley

Note:
Switching from "normal" to "shade" mode or vice versa also moves XMPlay back to the primary screen.
Guess this is related to the same boundary checks...
Logged
Rah'Dick
XMPlay Support
Posts: 923


« Reply #13 on: 7 Sep '04 - 09:49 »
Reply with quoteQuote

* Rah'Dick is willing to assist, too, since he will soon have a three-screen setup (2x Monitor, 1x TV)
Logged
Torkell
Posts: 1154


« Reply #14 on: 7 Sep '04 - 09:52 »
Reply with quoteQuote

* Rah'Dick is willing to assist, too, since he will soon have a three-screen setup (2x Monitor, 1x TV)
*drools* Grin

All you need to do now is to hack UT so it'll run on all three at once. Surround vision gaming!
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines