diff options
author | runge <runge@karlrunge.com> | 2010-12-29 10:05:52 -0500 |
---|---|---|
committer | runge <runge@karlrunge.com> | 2010-12-29 10:05:52 -0500 |
commit | 596331a5c3124f080cdcbb400c188c095048ef35 (patch) | |
tree | 66eb904b6c0181703d8f3c9ec81352a970d52601 /x11vnc/x11vnc.c | |
parent | 0c03b989407f9e5ea66b403011baaaad09fcd536 (diff) | |
download | libtdevnc-596331a5c3124f080cdcbb400c188c095048ef35.tar.gz libtdevnc-596331a5c3124f080cdcbb400c188c095048ef35.zip |
x11vnc: Use opengl to read screen on macosx. non-deprecated macosx interfaces for input injection.
Diffstat (limited to 'x11vnc/x11vnc.c')
-rw-r--r-- | x11vnc/x11vnc.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c index d427f32..64a73de 100644 --- a/x11vnc/x11vnc.c +++ b/x11vnc/x11vnc.c @@ -2026,7 +2026,6 @@ static void check_guess_auth_file(void) { } } -extern int dragum(void); extern int is_decimal(char *); int main(int argc, char* argv[]) { @@ -2530,9 +2529,17 @@ int main(int argc, char* argv[]) { got_localhost = 1; continue; } + if (!strcmp(arg, "-unixsock")) { + CHECK_ARGC + unix_sock = strdup(argv[++i]); + continue; + } if (!strcmp(arg, "-listen6")) { + CHECK_ARGC #if X11VNC_IPV6 listen_str6 = strdup(argv[++i]); +#else + ++i; #endif continue; } @@ -3931,6 +3938,14 @@ int main(int argc, char* argv[]) { macosx_us_kbd = 1; continue; } + if (!strcmp(arg, "-macnoopengl")) { + macosx_no_opengl = 1; + continue; + } + if (!strcmp(arg, "-macnorawfb")) { + macosx_no_rawfb = 1; + continue; + } if (!strcmp(arg, "-gui")) { launch_gui = 1; if (i < argc-1) { @@ -5775,7 +5790,7 @@ int main(int argc, char* argv[]) { waitms = 5; } if (!quiet) { - rfbLog("fast read: reset wait ms to: %d\n", waitms); + rfbLog("fast read: reset -wait ms to: %d\n", waitms); } } if (! got_deferupdate && ! got_defer) { @@ -5788,7 +5803,7 @@ int main(int argc, char* argv[]) { if (screen) { screen->deferUpdateTime = defer_update; } - rfbLog("fast read: reset defer ms to: %d\n", defer_update); + rfbLog("fast read: reset -defer ms to: %d\n", defer_update); } } } @@ -5816,6 +5831,20 @@ int main(int argc, char* argv[]) { } } } + +#ifdef MACOSX + if (remote_cmd || query_cmd) { + ; + } else if (macosx_console) { + double dt = dnow(); + copy_screen(); + dt = dnow() - dt; + rfbLog("macosx_console: copied screen in %.3f sec %.1f MB/sec\n", + dt, dpy_x * dpy_y * bpp / (1e+6 * 8 * dt)); + + } +#endif + if (! quiet) { rfbLog("screen setup finished.\n"); if (SHOW_NO_PASSWORD_WARNING && !nopw) { |