1get_gfx_mode_list(3) Allegro manual get_gfx_mode_list(3)
2
3
4
6 get_gfx_mode_list - Obtains a list of available video modes. Allegro
7 game programming library.
8
10 #include <allegro.h>
11
12
13 GFX_MODE_LIST *get_gfx_mode_list(int card);
14
16 Attempts to create a list of all the supported video modes for a cer‐
17 tain graphics driver, made up from the GFX_MODE_LIST structure, which
18 has the following definition:
19
20 typedef struct GFX_MODE_LIST
21 {
22 int num_modes;
23 GFX_MODE *mode;
24 } GFX_MODE_LIST;
25
26 The mode entry points to the actual list of video modes.
27
28 typedef struct GFX_MODE
29 {
30 int width, height, bpp;
31 } GFX_MODE;
32
33 This list of video modes is terminated with an { 0, 0, 0 } entry.
34
35 Note that the card parameter must refer to a _real_ driver. This func‐
36 tion fails if you pass GFX_SAFE, GFX_AUTODETECT, or any other "magic"
37 driver.
38
40 Returns a pointer to a list structure of the type GFX_MODE_LIST or NULL
41 if the request could not be satisfied.
42
43
45 destroy_gfx_mode_list(3), set_gfx_mode(3), set_color_depth(3)
46
47
48
49Allegro version 4.2.2 get_gfx_mode_list(3)