diff options
Diffstat (limited to 'x11vnc/linuxfb.c')
-rw-r--r-- | x11vnc/linuxfb.c | 38 |
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; |