Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
3 monitors #467199
07/20/17 11:29
07/20/17 11:29
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
Germany
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?

Re: 3 monitors [Re: preacherX] #467200
07/20/17 12:08
07/20/17 12:08
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
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.

Last edited by Reconnoiter; 07/20/17 12:09.
Re: 3 monitors [Re: Reconnoiter] #467202
07/20/17 15:41
07/20/17 15:41
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
Germany
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?

Re: 3 monitors [Re: preacherX] #467220
07/21/17 11:17
07/21/17 11:17
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
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.

Last edited by Reconnoiter; 07/21/17 11:18.
Re: 3 monitors [Re: Reconnoiter] #467228
07/21/17 12:21
07/21/17 12:21
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
Germany
This could work... But is there also a way how I can automatic detect how much monitors are available?

Re: 3 monitors [Re: preacherX] #467233
07/21/17 14:45
07/21/17 14:45
Joined: Jul 2014
Posts: 72
D
DriftWood Offline
Junior Member
DriftWood  Offline
Junior Member
D

Joined: Jul 2014
Posts: 72
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**

Last edited by DriftWood; 07/21/17 16:26.
Re: 3 monitors [Re: DriftWood] #467240
07/21/17 17:08
07/21/17 17:08
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
Germany
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.

Re: 3 monitors [Re: preacherX] #467241
07/21/17 18:04
07/21/17 18:04
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
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.

Re: 3 monitors [Re: Ch40zzC0d3r] #467242
07/21/17 19:53
07/21/17 19:53
Joined: Jul 2014
Posts: 72
D
DriftWood Offline
Junior Member
DriftWood  Offline
Junior Member
D

Joined: Jul 2014
Posts: 72
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

Last edited by DriftWood; 07/21/17 20:17. Reason: Link spam
Re: 3 monitors [Re: Ch40zzC0d3r] #467461
08/03/17 20:23
08/03/17 20:23
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline OP
Senior Member
preacherX  Offline OP
Senior Member

Joined: Sep 2005
Posts: 352
Germany
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.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1