diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-01-17 16:04:24 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-01-17 17:15:59 +0100 |
commit | cc8fba5b4e43bf4c635beee6882284605e9f8076 (patch) | |
tree | 8a739bb9aa2faf145ddc5ee145c5684e04373555 /platform | |
parent | 04128c3c7d5cab9d1c740c1af3dcca4e5c0c3d5f (diff) | |
download | mupdf-cc8fba5b4e43bf4c635beee6882284605e9f8076.tar.xz |
x11: Add -b flag to x11 viewer.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/x11_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index 555e36a1..ace1a9ef 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -835,6 +835,7 @@ int main(int argc, char **argv) struct timeval now; struct timeval *timeout; struct timeval tmo_advance_delay; + int bps = 0; ctx = fz_new_context(NULL, NULL, FZ_STORE_DEFAULT); if (!ctx) @@ -845,7 +846,7 @@ int main(int argc, char **argv) pdfapp_init(ctx, &gapp); - while ((c = fz_getopt(argc, argv, "p:r:A:C:W:H:S:U:X")) != -1) + while ((c = fz_getopt(argc, argv, "p:r:A:C:W:H:S:U:Xb:")) != -1) { switch (c) { @@ -864,6 +865,7 @@ int main(int argc, char **argv) case 'S': gapp.layout_em = fz_atof(fz_optarg); break; case 'U': gapp.layout_css = fz_optarg; break; case 'X': gapp.layout_use_doc_css = 0; break; + case 'b': bps = (fz_optarg && *fz_optarg) ? fz_atoi(fz_optarg) : 4096; break; default: usage(); } } @@ -895,7 +897,10 @@ int main(int argc, char **argv) tmo_at.tv_usec = 0; timeout = NULL; - pdfapp_open(&gapp, filename, 0); + if (bps) + pdfapp_open_progressive(&gapp, filename, 0, bps); + else + pdfapp_open(&gapp, filename, 0); FD_ZERO(&fds); |