summaryrefslogtreecommitdiffstats
path: root/x11vnc/screen.c
diff options
context:
space:
mode:
authorrunge <runge>2006-12-28 05:24:25 +0000
committerrunge <runge>2006-12-28 05:24:25 +0000
commit56eb45a5f8ab93abb1e15d4c0b8214d06a3d6d18 (patch)
tree34da978baeba2c625611bcaaf8cba8571ab00f8b /x11vnc/screen.c
parent8aa6fb9523957c7f4a3f14fb2c90ea9f9292a41f (diff)
downloadlibtdevnc-56eb45a5f8ab93abb1e15d4c0b8214d06a3d6d18.tar.gz
libtdevnc-56eb45a5f8ab93abb1e15d4c0b8214d06a3d6d18.zip
x11vnc: more work on -ncache.
Diffstat (limited to 'x11vnc/screen.c')
-rw-r--r--x11vnc/screen.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/x11vnc/screen.c b/x11vnc/screen.c
index 57244a5..7b583fa 100644
--- a/x11vnc/screen.c
+++ b/x11vnc/screen.c
@@ -701,6 +701,7 @@ void free_old_fb(void) {
void do_new_fb(int reset_mem) {
XImage *fb;
+ int i;
/* for threaded we really should lock libvncserver out. */
if (use_threads) {
@@ -725,7 +726,6 @@ void do_new_fb(int reset_mem) {
initialize_blackouts_and_xinerama();
initialize_polling_images();
}
-
}
static void remove_fake_fb(void) {
@@ -2035,18 +2035,25 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
#ifndef NO_NCACHE
if (ncache > 0) {
- char *new_fb;
- int sz = fb->height * fb->bytes_per_line;
-
- new_fb = (char *) calloc((size_t) (sz * (1+ncache)), 1);
- if (fb->data) {
- memcpy(new_fb, fb->data, sz);
- free(fb->data);
- }
- fb->data = new_fb;
- fb->height *= (1+ncache);
- height *= (1+ncache);
- ncache0 = ncache;
+#ifdef MACOSX
+ if (! raw_fb_str || macosx_console) {
+#else
+ if (! raw_fb_str) {
+#endif
+
+ char *new_fb;
+ int sz = fb->height * fb->bytes_per_line;
+
+ new_fb = (char *) calloc((size_t) (sz * (1+ncache)), 1);
+ if (fb->data) {
+ memcpy(new_fb, fb->data, sz);
+ free(fb->data);
+ }
+ fb->data = new_fb;
+ fb->height *= (1+ncache);
+ height *= (1+ncache);
+ ncache0 = ncache;
+ }
}
#endif