ChangeDisplayMode(mode[, table])
ChangeDisplayMode(mode[, width, height, table])
mode parameter. This can be one of the following modes:
#DISPMODE_FULLSCREEN:#DISPMODE_FULLSCREENSCALE (see below) which will simply scale the display to
the monitor's resolution. If you choose to use #DISPMODE_FULLSCREEN, you can
pass the desired monitor resolution in the Width and Height tags of the
optional table argument (see below). If you don't set Width and Height, the
best monitor resolution for the display's current dimensions will be chosen
automatically. If the display is already in full screen mode and you pass
#DISPMODE_FULLSCREEN in the mode argument, ChangeDisplayMode() can be used to
change the current monitor resolution to a different one.
#DISPMODE_WINDOWED:
#DISPMODE_FULLSCREENSCALE:LayerScale tag in the optional table argument (see below) to True to use
the layer scaling engine instead. See Scaling engines for details.
Note, however, that #DISPMODE_FULLSCREENSCALE can become quite slow on platforms
which don't support hardware-accelerated scaling. (V9.0)
#DISPMODE_MODESWITCH:#DISPMODE_MODESWITCH
can be both, #DISPMODE_FULLSCREEN and #DISPMODE_FULLSCREENSCALE. #DISPMODE_MODESWITCH
uses the same logic as the ALT+RETURN hotkey that switches a Hollywood display
between full screen and windowed mode. See the documentation of the ScaleSwitch
tag in the documentation of the @DISPLAY preprocessor command
for details. See DISPLAY for details. (V9.0)
Starting with Hollywood 6.0 this function accepts an optional table argument which allows you to configure further options:
Width:mode is #DISPMODE_FULLSCREEN, this tag can be used to
specify the width of the resolution the monitor should be switched to.
You can also pass the special constant #NATIVE here to indicate that Hollywood
should use the monitor's native width.
Height:mode is #DISPMODE_FULLSCREEN, this tag can be used to
specify the height of the resolution the monitor should be switched to.
You can also pass the special constant #NATIVE here to indicate that Hollywood
should use the monitor's native height.
LayerScale:mode is #DISPMODE_FULLSCREENSCALE, this tag can be used
to make Hollywood use the layer scaling engine instead of the auto scaling
engine. See Scaling engines for details. Defaults to False. (V9.0)
KeepProportions:mode is #DISPMODE_FULLSCREENSCALE, you can activate
proportional scaling by setting this tag to True. Defaults to False. (V9.0)
SmoothScale:mode is #DISPMODE_FULLSCREENSCALE, you can activate
interpolated scaling by setting this tag to True. Defaults to False. (V9.0)
Monitor:
Backfill:Backfill tag of the @DISPLAY
preprocessor command. See DISPLAY for details.
Note that starting with Hollywood 6.0 it is possible to have more than one display in full screen mode since Hollywood 6.0 introduces support for multiple monitors. This makes it possible to have several displays running in full screen mode on separate displays.
To find out whether or not the desired display mode can be handled by the current monitor, use the GetDisplayModes() function.
ChangeDisplayMode(#DISPMODE_FULLSCREEN, {Width = 1024, Height = 768})
NPrint("We are now in full screen mode. Press left mouse to return\n" ..
"to windowed mode.")
WaitLeftMouse
ChangeDisplayMode(#DISPMODE_WINDOWED)
NPrint("We are back in windowed mode now.")
WaitLeftMouse
The code above goes into 1024x768 full screen mode, waits for left mouse
button to be pressed and then returns to windowed mode again.