libvnc: add initial port
This commit is contained in:
committed by
Alexander Boettcher
parent
e774b38395
commit
765f547140
9
src/app/sdl_vnc/target.mk
Normal file
9
src/app/sdl_vnc/target.mk
Normal file
@@ -0,0 +1,9 @@
|
||||
SDLVNCVIEWER_PORT_DIR := $(call select_from_ports,libvnc)
|
||||
|
||||
TARGET = sdl_vnc
|
||||
|
||||
SRC_C = SDLvncviewer.c scrap.c
|
||||
|
||||
LIBS = vncclient sdl libc zlib
|
||||
|
||||
vpath %.c $(SDLVNCVIEWER_PORT_DIR)/src/lib/vnc/client_examples
|
||||
33
src/app/sdl_vnc/vnc_pwd.patch
Normal file
33
src/app/sdl_vnc/vnc_pwd.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
+++ src/lib/vnc/client_examples/SDLvncviewer.c
|
||||
@@ -474,6 +474,10 @@
|
||||
put_scrap(T('T', 'E', 'X', 'T'), len, text);
|
||||
}
|
||||
|
||||
+static char * pwd_hack = 0;
|
||||
+static char* ReadPassword(rfbClient* client) {
|
||||
+ return pwd_hack;
|
||||
+}
|
||||
|
||||
#ifdef mac
|
||||
#define main SDLmain
|
||||
@@ -500,6 +504,12 @@
|
||||
argv[i] = "-listennofork";
|
||||
++j;
|
||||
}
|
||||
+ else if (i+1<argc && !strcmp(argv[i], "-password")) {
|
||||
+ pwd_hack = strdup(argv[i+1]);
|
||||
+ for (int k = i; k + 2 < argc; k++)
|
||||
+ argv[k] = argv[k+2];
|
||||
+ argc -= 2;
|
||||
+ }
|
||||
else {
|
||||
if (i != j)
|
||||
argv[j] = argv[i];
|
||||
@@ -525,6 +535,7 @@
|
||||
cl->GotXCutText = got_selection;
|
||||
cl->listenPort = LISTEN_PORT_OFFSET;
|
||||
cl->listen6Port = LISTEN_PORT_OFFSET;
|
||||
+ cl->GetPassword = ReadPassword;
|
||||
if(!rfbInitClient(cl,&argc,argv))
|
||||
{
|
||||
cl = NULL; /* rfbInitClient has already freed the client struct */
|
||||
Reference in New Issue
Block a user