ChangeDisplayMode -- switch between window and full screen mode (V4.5)
ChangeDisplayMode(mode[, width, height, table])
This function can be used to switch the active display between windowed and full screen mode. If you pass #DISPMODE_WINDOWED in mode, ChangeDisplayMode() will switch the currently active display from full screen into windowed mode. If you pass #DISPMODE_FULLSCREEN in mode, there will be a switch from windowed to full screen mode and you can use the width and height arguments to tell Hollywood the resolution it shall switch the display's monitor into. If you don't pass these two optional arguments together with #DISPMODE_FULLSCREEN, the display's current dimensions will be used.

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.

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.

Starting with Hollywood 6.0 this function accepts an optional table argument which allows you to configure further options:

This tag allows you to specify the monitor that should be used when putting the display into full screen or windowed mode. Monitors are counted from 1 which is the primary monitor. By default, the monitor currently associated with the active display is used.

This tag allows you to configure the backfill setting for this display. The table you have to specify here has to follow the same conventions as its counterpart that can be passed to the Backfill tag of the @DISPLAY preprocessor command. See DISPLAY for details.

Starting with Hollywood 7.0 you can also pass the special constant #NATIVE in the width and height parameters. In that case, Hollywood will use the dimensions of the display's host device.

mode to switch into; can be either #DISPMODE_WINDOWED or #DISPMODE_FULLSCREEN
optional: width for full screen mode when mode is set to #DISPMODE_FULLSCREEN (defaults to current display width)
optional: height for full screen mode when mode is set to #DISPMODE_FULLSCREEN (defaults to current display height)
optional: table configuring further options (see above) (V6.0)
ChangeDisplayMode(#DISPMODE_FULLSCREEN, 1024, 768)
NPrint("We are now in full screen mode. Press left mouse to return\n" ..
   "to windowed mode.")
NPrint("We are back in windowed mode now.")
The code above goes into 1024x768 full screen mode, waits for left mouse button to be pressed and then returns to windowed mode again.

Show TOC