1 #include <cybergraphx/cybergraphics.h>
2 #include <intuition/monitorclass.h>
4 #include <proto/alib.h>
5 #include <proto/intuition.h>
9 static STRPTR pfnames
[] =
27 static UBYTE depths
[] = {8, 15, 16, 24, 32, 0};
31 Object
**monitors
, **mon
;
33 monitors
= GetMonitorList(NULL
);
37 printf("Failed to obtain monitors list!\n");
41 for (mon
= monitors
; *mon
; mon
++)
47 GetAttr(MA_MonitorName
, *mon
, (IPTR
*)&name
);
48 GetAttr(MA_DriverName
, *mon
, (IPTR
*)&drvname
);
49 printf("Monitor %p %s %s\n", *mon
, name
, drvname
);
51 printf("Supported pixelformats:\n");
52 GetAttr(MA_PixelFormats
, *mon
, (IPTR
*)&pfs
);
53 for (i
= PIXFMT_LUT8
; i
<= PIXFMT_RGBA32
; i
++)
54 printf(" %7s %s\n", pfnames
[i
], pfs
[i
] ? "yes" : "no");
56 printf("Preferred pixelformats:\n");
57 for (i
= 0; depths
[i
]; i
++)
61 printf(" %2d ", depths
[i
]);
62 DoMethod(*mon
, MM_GetDefaultPixelFormat
, depths
[i
], (IPTR
*)&pf
);
64 if (pf
<= PIXFMT_RGBA32
)
65 printf("%s\n", pfnames
[pf
]);
67 printf("Not supported\n");
69 printf("Unknown (%ld)\n", pf
);
74 FreeMonitorList(monitors
);