diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2016-03-31 21:57:53 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-03-31 21:57:53 +0200 |
commit | d780332c4b2fae4bbbb19c5d170e3810bc3184ac (patch) | |
tree | 624d17999ba32a2c8e8d7305b941ad746e0c7a06 /fbpdf.c | |
parent | 677fee9d0277c990e19760e1543ed07ed5115a07 (diff) | |
download | fbida-d780332c4b2fae4bbbb19c5d170e3810bc3184ac.tar.gz |
fbpdf: add pageflip option, misc
Diffstat (limited to 'fbpdf.c')
-rw-r--r-- | fbpdf.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -246,7 +246,7 @@ int main(int argc, char *argv[]) { GError *err = NULL; bool framebuffer = false; - bool quit, newpage; + bool quit, newpage, opengl, pageflip; char cwd[1024]; char uri[1024]; char key[32]; @@ -271,6 +271,8 @@ int main(int argc, char *argv[]) drm_info(cfg_get_str(O_DEVICE)); exit(0); } + if (GET_WRITECONF()) + fbi_write_config(); if (optind+1 != argc ) { usage(stderr, argv[0]); @@ -300,15 +302,17 @@ int main(int argc, char *argv[]) output = cfg_get_str(O_OUTPUT); mode = cfg_get_str(O_VIDEO_MODE); fitwidth = GET_FIT_WIDTH(); + opengl = GET_OPENGL(); + pageflip = GET_PAGEFLIP(); if (device) { /* device specified */ if (strncmp(device, "/dev/d", 6) == 0) { - if (GET_OPENGL()) { + if (opengl) { gfx = drm_init_egl(device, output); } if (!gfx) { - gfx = drm_init(device, output, true); + gfx = drm_init(device, output, pageflip); } } else { framebuffer = true; @@ -316,11 +320,11 @@ int main(int argc, char *argv[]) } } else { /* try drm first, failing that fb */ - if (GET_OPENGL()) { + if (opengl) { gfx = drm_init_egl(NULL, output); } if (!gfx) { - gfx = drm_init(NULL, output, true); + gfx = drm_init(NULL, output, pageflip); } if (!gfx) { framebuffer = true; |