getDisplaySettings

Syntax

int getDisplaySettings(int s)

Arguments

s
Set to 0 for the bit depth, to 1 for the horizontal resolution in pixels, to 2 for the vertical resolution in pixels and to 3 for the refresh rate in Hz of the screen.

Return

Returns a value according to the used s parameter.

Description

Lets you know the bit depth, resolution and refresh rate of the screen. Especially the refresh rate is useful if you want to display an animation in the preview with the help of setTimerEvent and updatePreview. Because if you draw more frames per second than the refresh rate is able to display, your animation will flicker.

Example

%ffp

ForEveryTile:
{

  Info (" %d bit \n %d x %d pixel \n %d Hz", getDisplaySettings(0), getDisplaySettings(1), getDisplaySettings(2), getDisplaySettings(3));

  return true;
}

Also see

setTimerEvent, updatePreview