Skip to content

CountDisplays

Claude edited this page Oct 27, 2026 · 4 revisions
BlitzLLVM

CountDisplays 〔BlitzLLVM〕

CountDisplays:Int32

Returns: The number of displays, at least 1.

Description

〔BlitzLLVM〕 This command does not exist in the original Blitz products. BlitzLLVM adds it.

Counts the displays (monitors) that are connected and shows something. Use the number with DisplayName, DisplayWidth, CountDisplayModes and the other display commands, which take a display from 1 to this value. This is a BlitzLLVM extension: the originals have no way to ask for more than the main display. The displays are looked at again every time this is called, so a program that wants to notice a display being plugged in or out can call it again.

Differences

  • When SDL knows of no display, for example without a display driver, there is one display called "Default" with the common sizes of CountGfxModes. Can be asked before Graphics opens a window.

Examples

For d = 1 To CountDisplays()
	Print d + ": " + DisplayName(d) + ", " + DisplayWidth(d) + " x " + DisplayHeight(d) + " at " + DisplayRefreshRate(d) + " Hz"
Next
WaitKey

Related Commands

CountDisplayModes 〔BlitzLLVM〕, CountGfxDrivers, CountGfxModes, CountRefreshRates 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally