1get_gfx_mode_type(3) Allegro manual get_gfx_mode_type(3)
2
3
4
6 get_gfx_mode_type - Retrieves type information for a specific graphics
7 card. Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 int get_gfx_mode_type(int graphics_card);
14
16 This function lets you determine the types of operating modes that a
17 specific graphics card driver operates in. It will tell you whether it
18 is a windowed, fullscreen, definitely windowed or fullscreen, and/or a
19 magic driver.
20
21 The value returned is a bitfield consisting of these fields:
22
23 GFX_TYPE_UNKNOWN GFX_TYPE_WINDOWED GFX_TYPE_FULLSCREEN GFX_TYPE_DEFI‐
24 NITE GFX_TYPE_MAGIC
25
26
27 The return value will only be equivalent to GFX_TYPE_UNKNOWN when it is
28 a driver unrecognized on that platform, or it is a bogus value. Test
29 for the other types by using a bitwise AND. If the driver is windowed
30 or fullscreen, it will also have the definite flag set. For example,
31
32 int gfx_type = get_gfx_mode_type(GFX_AUTODETECT_WINDOWED);
33
34 gfx_type would have the GFX_TYPE_WINDOWED, GFX_TYPE_DEFINITE, and
35 GFX_TYPE_MAGIC flags set.
36
37 Allegro needs to be initialized first.
38
39 Example:
40
41 /* Accept the use of only windowed drivers in our selection dialog */
42 int accept_windowed(int card , int w , int h , int color_depth)
43 {
44 if (get_gfx_mode_type(card) & GFX_TYPE_WINDOWED)
45 return 0;
46 return 1;
47 }
48
49 /* In main: */
50 gfx_mode_select_filter(&card, &w, &h, &color_depth, accept_windowed);
51
52
54 Returns a bitfield describing the graphics mode type.
55
56
58 gfx_mode_select_filter(3), get_gfx_mode(3), set_gfx_mode(3), is_win‐
59 dowed_mode(3)
60
61
62
63Allegro version 4.4.3 get_gfx_mode_type(3)