GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2020-08-14 17:38:54

gnysek
Member
Registered: 2011-12-29
Posts: 23

display_get_monitors_number

pre-2.3

Expandreturn array_length_1d(window_get_visible_rects(0,0,1,1))/8;

2.3+

Expandreturn array_length(window_get_visible_rects(0,0,1,1))/8;

This returns the number of displays/monitors/screens on current PC.

Offline

#2 2020-08-17 15:59:06

xot
Administrator
Registered: 2007-08-18
Posts: 1,221

Re: display_get_monitors_number

Interesting. I was not even aware of window_get_visible_rects().


Abusing forum power since 1986.

Offline

#3 2020-08-18 18:27:14

gnysek
Member
Registered: 2011-12-29
Posts: 23

Re: display_get_monitors_number

I just discovered this function 15 minutes before I made this post, when searching how to detect two monitors. And it was mentioned somewhere on YYG community between words by someone, but totally overlooked by others...

Offline

Board footer

Powered by FluxBB