diff options
author | nalin <nalin> | 1999-07-18 09:33:22 +0000 |
---|---|---|
committer | nalin <nalin> | 1999-07-18 09:33:22 +0000 |
commit | f605d36806854fccd0057853e1d1a81868b82056 (patch) | |
tree | 29c7369f33c232136f324d20fc436b02140b3236 /ddcprobe | |
parent | 75d74b8f61de2e50989bf3b601ad414abdeeb964 (diff) | |
download | anaconda-f605d36806854fccd0057853e1d1a81868b82056.tar.gz anaconda-f605d36806854fccd0057853e1d1a81868b82056.tar.xz anaconda-f605d36806854fccd0057853e1d1a81868b82056.zip |
Initial revision
Diffstat (limited to 'ddcprobe')
-rw-r--r-- | ddcprobe/ddcxinfo.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ddcprobe/ddcxinfo.c b/ddcprobe/ddcxinfo.c new file mode 100644 index 000000000..0a384a8c0 --- /dev/null +++ b/ddcprobe/ddcxinfo.c @@ -0,0 +1,42 @@ +#include <stdio.h> +#include <stdlib.h> +#include "vbe.h" + +int main(int argc, char **argv) +{ + int i, j; + unsigned char hmin, hmax, vmin, vmax; + if(argc < 2) { + fprintf(stderr, "usage: %s [-hsync] [-vsync] [-modelines]\n", + argv[0]); + exit(1); + } + for(i = 1; i < argc; i++) { + if(strcmp(argv[i], "-hsync") == 0) { + vbe_get_edid_ranges(&hmin, &hmax, &vmin, &vmax); + printf("%d-%d\n", hmin, hmax); + } + if(strcmp(argv[i], "-vsync") == 0) { + vbe_get_edid_ranges(&hmin, &hmax, &vmin, &vmax); + printf("%d-%d\n", vmin, vmax); + } + if(strcmp(argv[i], "-modelines") == 0) { + struct vbe_modeline* modelines; + modelines = vbe_get_edid_modelines(); + for(j=0; modelines && (modelines[j].refresh != 0); j++){ + if(modelines[j].modeline) { + printf("# %dx%d, %1.1fHz\n%s\n", + modelines[j].width, + modelines[j].height, + modelines[j].refresh, + modelines[j].modeline); + free(modelines[j].modeline); + } + } + if(modelines) { + free(modelines); + } + } + } + return 0; +} |