summaryrefslogtreecommitdiff
path: root/apps/x11_main.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-07-16 17:58:36 +0000
committerTor Andersson <tor@ghostscript.com>2010-07-16 17:58:36 +0000
commita56b2d1d460f584c92196dbb6fcea989f1ef19f9 (patch)
tree3ac5f63071b0da4862c522ebcdd90063876028d4 /apps/x11_main.c
parentfdca3e67467a4266a14457f7ae2914ec6635c86c (diff)
downloadmupdf-a56b2d1d460f584c92196dbb6fcea989f1ef19f9.tar.xz
Add a flag to disable the accelerated plotting functions in pdfdraw.
Diffstat (limited to 'apps/x11_main.c')
-rw-r--r--apps/x11_main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/x11_main.c b/apps/x11_main.c
index 16ce9759..2582580f 100644
--- a/apps/x11_main.c
+++ b/apps/x11_main.c
@@ -507,7 +507,11 @@ static void onmouse(int x, int y, int btn, int modifiers, int state)
static void usage(void)
{
- fprintf(stderr, "usage: mupdf [-p password] [-r resolution] file.pdf [page]\n");
+ fprintf(stderr, "usage: mupdf [options] file.pdf [page]\n");
+ fprintf(stderr, "\t-p -\tpassword\n");
+ fprintf(stderr, "\t-r -\tresolution\n");
+ fprintf(stderr, "\t-A\tdisable accelerated functions\n");
+ fprintf(stderr, "usage: mupdf [options] file.pdf [page]\n");
exit(1);
}
@@ -565,14 +569,16 @@ int main(int argc, char **argv)
int pageno = 1;
int wasshowingpage;
struct timeval tmo, tmo_at;
+ int accelerate = 1;
int fd;
- while ((c = fz_getopt(argc, argv, "p:r:")) != -1)
+ while ((c = fz_getopt(argc, argv, "p:r:A")) != -1)
{
switch (c)
{
case 'p': password = fz_optarg; break;
case 'r': resolution = atoi(fz_optarg); break;
+ case 'A': accelerate = 0; break;
default: usage();
}
}
@@ -590,7 +596,8 @@ int main(int argc, char **argv)
if (argc - fz_optind == 1)
pageno = atoi(argv[fz_optind++]);
- fz_accelerate();
+ if (accelerate)
+ fz_accelerate();
winopen();