summaryrefslogtreecommitdiffstats
path: root/x11vnc/8to24.c
diff options
context:
space:
mode:
authorrunge <runge>2006-05-07 00:50:13 +0000
committerrunge <runge>2006-05-07 00:50:13 +0000
commit279f35495a122c9892198545f83e03c6fc50fa08 (patch)
tree7ce00691a9f77432cead7a5f4ae702fc62878019 /x11vnc/8to24.c
parent0d734ad8967eafab1fb058280a0db04e7470e569 (diff)
downloadlibtdevnc-279f35495a122c9892198545f83e03c6fc50fa08.tar.gz
libtdevnc-279f35495a122c9892198545f83e03c6fc50fa08.zip
x11vnc: support for video4linux webcams & tv-tuners, -24to32 bpp option, -rawfb console.
Diffstat (limited to 'x11vnc/8to24.c')
-rw-r--r--x11vnc/8to24.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/x11vnc/8to24.c b/x11vnc/8to24.c
index 01d9316..5304a52 100644
--- a/x11vnc/8to24.c
+++ b/x11vnc/8to24.c
@@ -70,6 +70,8 @@ static void set_root_cmap(void) {
static XColor color[NCOLOR];
int redo = 0;
+ RAWFB_RET_VOID
+
if (now > last_set + 10) {
redo = 1;
}
@@ -134,6 +136,8 @@ static int check_pointer_in_depth24(void) {
c = window;
+ RAWFB_RET(0)
+
if (now > last_keyboard_time + 1.0 && now > last_pointer_time + 1.0) {
return 0;
}
@@ -251,6 +255,8 @@ void check_for_multivis(void) {
double now = dnow();
double delay;
+ RAWFB_RET_VOID
+
if (now > last_parse + 1.0) {
last_parse = now;
parse_cmap8to24();
@@ -743,6 +749,7 @@ if (db24 > 1) fprintf(stderr, " ------------ 0x%lx i=%d\n", windows_8bp
}
static XImage *p_xi(XImage *xi, Visual *visual, int win_depth, int *w) {
+ RAWFB_RET(NULL)
if (xi == NULL || *w < dpy_x) {
char *d;
if (xi) {
@@ -782,6 +789,8 @@ static int poll_line(int x1, int x2, int y1, int n, sraRegionPtr mod) {
int mx1, mx2, my1, my2;
int ns = NSCAN/2;
+ RAWFB_RET(1)
+
if (win == None) {
return 1;
}
@@ -1269,6 +1278,8 @@ static int get_cmap(int j, Colormap cmap) {
int i, ncells;
XErrorHandler old_handler = NULL;
+ RAWFB_RET(0)
+
if (0) {
/* not working properly for depth 24... */
X_LOCK;
@@ -1401,7 +1412,7 @@ static XImage *cmap_xi(XImage *xi, Window win, int win_depth) {
if (xi) {
XDestroyImage(xi);
}
- if (! valid_window(win, &attr, 1)) {
+ if (! dpy || ! valid_window(win, &attr, 1)) {
return (XImage *) NULL;
}
if (attr.depth != win_depth) {
@@ -1434,6 +1445,8 @@ static void transform_rect(sraRect rect, Window win, int win_depth, int cm) {
if (db24 > 1) fprintf(stderr, "transform %4d %4d %4d %4d cm: %d\n", rect.x1, rect.y1, rect.x2, rect.y2, cm);
+ RAWFB_RET_VOID
+
/* now transform the pixels in this rectangle: */
n_off = main_bytes_per_line * rect.y1 + pixelsize * rect.x1;
@@ -1653,6 +1666,8 @@ void bpp8to24(int x1, int y1, int x2, int y2) {
double now;
double dt, d0 = 0.0, t2;
+ RAWFB_RET_VOID
+
if (! cmap8to24 || ! cmap8to24_fb) {
/* hmmm, why were we called? */
return;
@@ -1877,6 +1892,8 @@ void mark_8bpp(int mode) {
int i, cnt = 0;
Window top = None;
+ RAWFB_RET_VOID
+
if (! cmap8to24 || !cmap8to24_fb) {
return;
}