summaryrefslogtreecommitdiffstats
path: root/x11vnc/screen.c
diff options
context:
space:
mode:
authorrunge <runge@karlrunge.com>2010-12-21 12:04:02 -0500
committerrunge <runge@karlrunge.com>2010-12-21 12:04:02 -0500
commit365a22c63cb292ea494f39ebc48a37e322e5eb14 (patch)
treeca6e87ab396ee00a837b09b2c6cede62aec69dae /x11vnc/screen.c
parentd4fabc217e8cd02aca4d248229bb8a030b2bbfe2 (diff)
downloadlibtdevnc-365a22c63cb292ea494f39ebc48a37e322e5eb14.tar.gz
libtdevnc-365a22c63cb292ea494f39ebc48a37e322e5eb14.zip
x11vnc: touchscreen uinput support and Java viewer mousewheel support. See x11vnc/ChangeLog for rest.
Diffstat (limited to 'x11vnc/screen.c')
-rw-r--r--x11vnc/screen.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/x11vnc/screen.c b/x11vnc/screen.c
index 6bada90..067d144 100644
--- a/x11vnc/screen.c
+++ b/x11vnc/screen.c
@@ -1461,7 +1461,19 @@ char *vnc_reflect_guess(char *str, char **raw_fb_addr) {
char *str0 = strdup(str);
if (client == NULL) {
- client = rfbGetClient(8, 3, 4);
+ int bitsPerSample = 8;
+ int samplesPerPixel = 3;
+ int bytesPerPixel = 4;
+ char *s;
+ s = getenv("X11VNC_REFLECT_bitsPerSample");
+ if (s) bitsPerSample = atoi(s);
+ s = getenv("X11VNC_REFLECT_samplesPerPixel");
+ if (s) samplesPerPixel = atoi(s);
+ s = getenv("X11VNC_REFLECT_bytesPerPixel");
+ if (s) bytesPerPixel = atoi(s);
+ rfbLog("rfbGetClient(bitsPerSample=%d, samplesPerPixel=%d, bytesPerPixel=%d)\n",
+ bitsPerSample, samplesPerPixel, bytesPerPixel);
+ client = rfbGetClient(bitsPerSample, samplesPerPixel, bytesPerPixel);
}
rfbLog("rawfb: %s\n", str);
@@ -2086,16 +2098,16 @@ if (db) fprintf(stderr, "initialize_raw_fb reset\n");
/* hmmm, not following directions, see if map: applies */
struct stat sbuf;
if (stat(str, &sbuf) == 0) {
- char *new;
+ char *newstr;
int len = strlen("map:") + strlen(str) + 1;
rfbLog("no type prefix: %s\n", raw_fb_str);
rfbLog(" but file exists, so assuming: map:%s\n",
raw_fb_str);
- new = (char *) malloc(len);
- strcpy(new, "map:");
- strcat(new, str);
+ newstr = (char *) malloc(len);
+ strcpy(newstr, "map:");
+ strcat(newstr, str);
free(str);
- str = new;
+ str = newstr;
}
}