X-Git-Url: https://eleni.mutantstargoat.com/git/?a=blobdiff_plain;f=src%2Ffbdev%2Fgfx.cc;h=e4527b0c04998b2198c294ecec0d48e3261d6812;hb=ecb25bb23fcd6f98fb049297483e312c84fd7b5b;hp=2b1c32a6d3079570025b2204fb6073d1ab3219ac;hpb=50e3f6daf627d72a500b07f053cb34f713f0c650;p=winnie diff --git a/src/fbdev/gfx.cc b/src/fbdev/gfx.cc index 2b1c32a..e4527b0 100644 --- a/src/fbdev/gfx.cc +++ b/src/fbdev/gfx.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -54,6 +55,20 @@ bool init_gfx() return false; } +// TODO: uncomment when I find how to use intelfb instead of i915 GRRRR.- + +/* + fb_vblank vblank; + if(ioctl(dev_fd, FBIOGET_VBLANK, &vblank) == -1) { + fprintf(stderr, "FBIOGET_VBLANK error: %s\n", strerror(errno)); + } + else { + printf("flags: %x\n", vblank.flags); + printf("count: %d\n", vblank.count); + printf("beam position: %d, %d\n", vblank.hcount, vblank.vcount); + } +*/ + return true; } @@ -233,4 +248,12 @@ void gfx_update() { } +void wait_vsync() +{ + unsigned long arg = 0; + if(ioctl(dev_fd, FBIO_WAITFORVSYNC, &arg) == -1) { +// printf("ioctl error %s\n", strerror(errno)); + } +} + #endif // WINNIE_FBDEV