display_get_width() Returns the width of the display in pixels.
display_get_height() Returns the height of the display in pixels.
display_get_colordepth() Returns the color depth in bits.
display_get_frequency() Returns the refresh frequency of the display.
display_set_size(w,h) Sets the width and height of the display in pixels. Returns whether this was successful. (Realize that only certain combinations are allowed.)
display_set_colordepth(coldepth) Sets the color depth. In general only 16 and 32 are allowed values. Returns whether successful.
display_set_frequency(frequency) Sets the refresh frequency for the display. Only few frequencies are allowed. Typically you could set this to 60 with a same room speed to get smooth 60 frames per second motion. Returns whether successful.
display_set_all(w,h,frequency,coldepth) Sets all at once. Use -1 for values you do not want to change. Returns whether successful.
display_test_all(w,h,frequency,coldepth) Tests whether the indicated settings are allowed. It does not change the settings. Use -1 for values you do not want to change. Returns whether the settings are allowed.
display_reset(AA) Resets the display settings to the ones when the program was started, and also allow you to change the current level of Full Screen Anti-Aliasing being used. Available levels are 0,2,4 and 8. GameMaker start up with 0.
display_aa This read-only variable will report the various levels of AA that a users machine can display. It will do this by setting bits for the different levels, so for only 2xAA, this will report 2, for 2x and 4x availablility it will report 6. For 8 and 4 it will report 12. For all 3 levels (2,4 and 8) it will report 14. To allow a user to set AA, use something like the code shown below..if( display_aa&2 ) display_reset(2);
Sometimes it is useful to get information about the position of the mouse on the display or to change this position. For this the following functions exist:
display_mouse_get_x() Returns the x-coordinate of the mouse on the display.
display_mouse_get_y() Returns the y-coordinate of the mouse on the display.
display_mouse_set(x,y) Sets the position of the mouse on the display to the indicated values.