3 monitors

Posted By: preacherX

3 monitors - 07/20/17 11:29

On Steam there is a user telling me that when he starts the game with his 3 monitors, that the game is running on all of them.

But when the game starts I'm using this:
video_set(sys_metrics(0), sys_metrics(1), 32, 1);

So the game should run only on one monitor, or not?
Posted By: Reconnoiter

Re: 3 monitors - 07/20/17 12:08

You mean like spread over 3 monitors or duplicated? I take it extended/spread, than I think windowed mode (borderless or not) should work, so that's 1 thing you can try.
Posted By: preacherX

Re: 3 monitors - 07/20/17 15:41

Yeah, it spread over all three monitors.

The problem occurs when users are using Nvidia's "Surround" mode, then video_set(sys_metrics(0), sys_metrics(1), 32, 1); thinks that all 3 monitors are one.

So, is there another way to detect the correct resolution of the main monitor?
Posted By: Reconnoiter

Re: 3 monitors - 07/21/17 11:17

What happens if the user sets a custom resolution? Like 1920x1080 or such. If that works (/only shows on 1 monitor), than it might be an idea to add an option where users can set their amount of monitors and than do something like this;
video_set(sys_metrics(0) / monitors, sys_metrics(1), 32, 1);

(probably doesn't work if the connected monitors have different max resolutions though)

Another idea might be to take a peek at msdn and see if there is some windows function that gives all the monitor's resolutions or such.
Posted By: preacherX

Re: 3 monitors - 07/21/17 12:21

This could work... But is there also a way how I can automatic detect how much monitors are available?
Posted By: DriftWood

Re: 3 monitors - 07/21/17 14:45

sys_metrics
http://www.conitec.net/beta/asys_metrics.htm
Int Num = Sys_metrics(80)

Also take a look at sys_metrics (76-79)

Edit - I read about "surround" -- It doesn't work like 3 monitors. Instead it creates one "primary " monitor out of 3-5.
This means that the video card is telling windows there is only one gaint primary display. So it would lie to dx9 and Windows. And tell sys_metrics that there is a single giant primary display. Because the conversation to 3 is happening after the game output to the card. The user should turn it off for a single display. Alternatively - They could enter the correct resolution at game start as it is configured in the Nvidia control panel in order for the game to output a single monitor size that actually fits all 3 displays.

Further reading would be need in the Nvidia developers knowledge base.
http://www.nvidia.com/object/3dv-system-requirements-surround-technology.html
http://developer.download.nvidia.com/whitepapers/2010/SurroundBestPracticesGuide.pdf

Nvidia surrounded faq

Quotes from "Best practices"
Quote:
NVIDIA Surround technology presents multiple displays as one large display to the
game and it can be difficult for a developer to know where the bezels of the actual
physical displays reside with respect to the final rendered image. It can also be difficult
to know if the current display mode is bezel-corrected, which results in some pixels being
virtually hidden behind the bezel for the sake of having rendered objects appear to line
up across the multiple displays. Bezel-correction is designed to create the perception of
looking through a window with panes, rather than just seeing the normal display
separated by display bezels. In this way, better immersion is afforded at the expense of
visibility of some of the rendered pixels (Figures 10 and 11).

Quote:
NVIDIA does not recommend developers look for a display number since the NVIDIA
Control Panel allows users to arrange the displays in any order they desire. Instead, it is
recommended that you use NVAPI for the most robust programmatic placement of
menu, video, and interface elements for Surround configurations. Here is an example
solution where we are querying for “visible rects” and then restricting the UI to the
visible part of the center display:

Quote:
Another way of doing this which does not require the use of NVAPI, but is less robust,
is to assume the user has a configuration that is three displays wide based on the aspect
ratio of the selected resolution, or let the user select an option in-game to enable this
mode. This example defines rough bezel-correction-safe horizontal boundaries for
programmatic placement of menu, video, and interface elements:

Quote:
Yet another solution for these placement issues is to allow the user to have some element
of control over the interface so they can offset interface elements by some amount or
control their exact location. This could function by means of in-game controls or by
exposing interface object positions in a text configuration file (which, for example, could
be edited by third party tools or even manually by users).



Summary - Best solution **Turn Off Surround - By user in Nvidia CP**
Posted By: preacherX

Re: 3 monitors - 07/21/17 17:08

The problem is indeed that sys_metrics(80) is only detecting one monitor if Surround mode is active. When the user on Steam turns it off, then the game is running correct on one monitor. However, the user is telling me that he only have to deactivate Surround Mode for my game - other games would automatically turn off his two outside monitors and display the game correct in Fullscreen on his middle monitor.
Posted By: Ch40zzC0d3r

Re: 3 monitors - 07/21/17 18:04

Tell him to send you a picture of the control panel or the device manager.
If windows still shows 3 monitors in one of them it is indeed possible to find out using windows APIs.
Posted By: DriftWood

Re: 3 monitors - 07/21/17 19:53

Please note this reply ^
But I don't think Surround uses windows. There was a section on setting it up to do a classic extend to the desktop or to only work in games excluding the desktop. I think windows is bypast. But Chaos would indeed know better.

Google links
https://www.reddit.com/r/fixindex/comments/3vmqzo/w_quickly_enabling_disabling_nvidia_surround_work/

http://forums.guru3d.com/showthread.php?t=408896
https://github.com/falahati/NVIDIASurroundToggler/issues/1

I can't say if there is a solution there. I would think you would need to ask in an Nvidia developers forum.

More link spam... NvApi ? Why not?
https://developer.nvidia.com/nvapi
https://developer.nvidia.com
Posted By: preacherX

Re: 3 monitors - 08/03/17 20:23

Originally Posted By: Ch40zzC0d3r
Tell him to send you a picture of the control panel or the device manager.
If windows still shows 3 monitors in one of them it is indeed possible to find out using windows APIs.


Sadly it is only showing one monitor.
© 2024 lite-C Forums