1 #include <cybergraphx/cybergraphics.h>
2 #include <intuition/monitorclass.h>
3 #include <proto/intuition.h>
7 static STRPTR pfnames
[] = {
24 static UBYTE depths
[] = {8, 15, 16, 24, 32, 0};
28 Object
**monitors
, **mon
;
30 monitors
= GetMonitorList(NULL
);
33 printf("Failed to obtain monitors list!\n");
37 for (mon
= monitors
; *mon
; mon
++) {
42 GetAttr(MA_MonitorName
, *mon
, (IPTR
*)&name
);
43 GetAttr(MA_DriverName
, *mon
, (IPTR
*)&drvname
);
44 printf("Monitor %p %s %s\n", *mon
, name
, drvname
);
46 printf("Supported pixelformats:\n");
47 GetAttr(MA_PixelFormats
, *mon
, (IPTR
*)&pfs
);
48 for (i
= PIXFMT_LUT8
; i
<= PIXFMT_RGBA32
; i
++)
49 printf(" %7s %s\n", pfnames
[i
], pfs
[i
] ? "yes" : "no");
51 printf("Preferred pixelformats:\n");
52 for (i
= 0; depths
[i
]; i
++) {
55 printf(" %2d ", depths
[i
]);
56 DoMethod(*mon
, MM_GetDefaultPixelFormat
, depths
[i
], (IPTR
*)&pf
);
58 if (pf
<= PIXFMT_RGBA32
)
59 printf("%s\n", pfnames
[pf
]);
61 printf("Not supported\n");
63 printf("Unknown (%ld)\n", pf
);
68 FreeMonitorList(monitors
);