summaryrefslogtreecommitdiffstats
path: root/x11vnc/linuxfb.c
diff options
context:
space:
mode:
authorrunge <runge>2006-08-10 21:51:23 +0000
committerrunge <runge>2006-08-10 21:51:23 +0000
commit816d7e06ad813ba24b0f68d67c53d35b66cc86d8 (patch)
treee4520d064587db1a477fbf463c4372ae8b51e239 /x11vnc/linuxfb.c
parent0bc50a9da9c63e6ab86c219ce88c3e92eafb9eb5 (diff)
downloadlibtdevnc-816d7e06ad813ba24b0f68d67c53d35b66cc86d8.tar.gz
libtdevnc-816d7e06ad813ba24b0f68d67c53d35b66cc86d8.zip
x11vnc: first pass at touchscreens via uinput.
Diffstat (limited to 'x11vnc/linuxfb.c')
-rw-r--r--x11vnc/linuxfb.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/x11vnc/linuxfb.c b/x11vnc/linuxfb.c
index 3649cd4..878d87f 100644
--- a/x11vnc/linuxfb.c
+++ b/x11vnc/linuxfb.c
@@ -94,20 +94,6 @@ char *console_guess(char *str, int *fd) {
}
}
- if (do_input) {
- if (tty >=0 && tty < 64) {
- pipeinput_str = (char *) malloc(10);
- sprintf(pipeinput_str, "CONSOLE%d", tty);
- rfbLog("console_guess: file pipeinput %s\n",
- pipeinput_str);
- initialize_pipeinput();
- } else if (have_uinput) {
- pipeinput_str = strdup("UINPUT");
- rfbLog("console_guess: file pipeinput %s\n",
- pipeinput_str);
- initialize_pipeinput();
- }
- }
if (! atparms) {
#if LIBVNCSERVER_HAVE_LINUX_FB_H
#if LIBVNCSERVER_HAVE_SYS_IOCTL_H
@@ -153,6 +139,30 @@ char *console_guess(char *str, int *fd) {
#endif
}
+ if (atparms) {
+ int gw, gh, gb;
+ if (sscanf(atparms, "%dx%dx%d", &gw, &gh, &gb) == 3) {
+ fb_x = gw;
+ fb_y = gh;
+ fb_b = gb;
+ }
+ }
+
+ if (do_input) {
+ if (tty >=0 && tty < 64) {
+ pipeinput_str = (char *) malloc(10);
+ sprintf(pipeinput_str, "CONSOLE%d", tty);
+ rfbLog("console_guess: file pipeinput %s\n",
+ pipeinput_str);
+ initialize_pipeinput();
+ } else if (have_uinput) {
+ pipeinput_str = strdup("UINPUT");
+ rfbLog("console_guess: file pipeinput %s\n",
+ pipeinput_str);
+ initialize_pipeinput();
+ }
+ }
+
if (! atparms) {
rfbLog("console_guess: could not get @ parameters.\n");
return NULL;