Code: Select all
struct DimensionInfo buf;
ULONG ModeID = getSomeValidScreenMode();
ULONG size = GetDisplayInfoData(NULL, &buf, sizeof(struct DimensionInfo), DTAG_DIMS, ModeID);
if(size==sizeof(struct DimensionInfo)) {
printf("success\n");
} else {
printf("failure\n");
}
NOTE also: This code apparently works on MorphOS, but not OS4.1.3.