Skip to content

CountRefreshRates

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
BlitzLLVM

CountRefreshRates 〔BlitzLLVM〕

CountRefreshRates:Int32 display:Int32, width:Int32, height:Int32
Parameter Mode Type Default Description
display In Int32 required The display number, from 1 to CountDisplays.
width In Int32 required The width in pixels of the size.
height In Int32 required The height in pixels of the size.

Returns: The number of refresh rates, or 0 if the display does not exist or does not have the size.

Description

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

The number of refresh rates a display supports at a size. A size is often available at 60 Hz and at higher rates such as 120 or 144 Hz. Use RefreshRateAt to get them. This is a BlitzLLVM extension: the originals have no way to ask for more than the main display.

Differences

  • A display number that does not exist gives 0 (an empty text for the name) instead of stopping the program, because a display can be unplugged while the program runs.

Examples

d = PrimaryDisplay()
w = DisplayWidth(d)
h = DisplayHeight(d)
For r = 1 To CountRefreshRates(d, w, h)
	Print w + " x " + h + " is possible at " + RefreshRateAt(d, w, h, r) + " Hz"
Next
WaitKey

Related Commands

CountDisplayModes 〔BlitzLLVM〕, CountDisplays 〔BlitzLLVM〕, CountGfxDrivers, CountGfxModes, DisplayModeRefreshRate 〔BlitzLLVM〕, DisplayRefreshRate 〔BlitzLLVM〕, RefreshRateAt 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally