Skip to content

Commit 4093ee2

Browse files
committed
updated the documentation to reflect the changes in v1.4.2
1 parent 4d6fe42 commit 4093ee2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/docs/libs/mapper/mapper_enumerate_display_info.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,22 @@ The number of elements in the array corresponds to the number of displays connec
1515

1616
|Key|Type|Description|
1717
|---|----|-----------|
18+
|id|number|Display number
1819
|x|number|The x-coordinate value of the top-left corner of the display in screen space
1920
|y|number|The y-coordinate value of the top-left corner of the display in screen space
2021
|width|number|The width of the display
2122
|height|number|The height of the display
23+
|name|string|Display name
24+
|adapter|string|Name of the graphics adapter to which the display is connected
25+
26+
:::warning NOTE
27+
Displays set to “**Disconnect this display**” in display settings are not included in the table returned by this function.
28+
In other words, the elements corresponding to display numbers marked as “**Disconnect this display**” will be `nil`.
29+
30+
Note that in such cases, using [`ipairs()`](https://www.lua.org/manual/5.4/manual.html#pdf-ipairs) on the returned table may not enumerate all elements.
31+
To iterate over all elements, use [`pairs()`](https://www.lua.org/manual/5.4/manual.html#pdf-pairs) instead.
32+
Similarly, the [`#` operator](https://www.lua.org/manual/5.4/manual.html#3.4.7) cannot be used to obtain the correct number of elements (i.e., the number of active displays).
33+
:::
2234

2335
## See Also
2436
- [Virtual Instrument Panel](/guide/virtual_instrument_panel)

0 commit comments

Comments
 (0)