CVS: rdesktop/uiports makefile_svga,NONE,1.1 svgareadme.txt,1.1,1.2 svgawin.c,1.1,1.2
Jay Sorg <[email protected]>
| Newsgroups | gmane.network.rdesktop.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/rdesktop/rdesktop/uiports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1402 Modified Files: svgareadme.txt svgawin.c Added Files: makefile_svga Log Message: added makefile and keyboard work from peter --- NEW FILE: makefile_svga --- CC = gcc CFLAGS = -Os -DWITH_OPENSSL -DL_ENDIAN -Wall RESTOBJ = ../tcp.o ../iso.o ../mcs.o ../secure.o ../rdp.o ../rdp5.o ../orders.o ../cache.o ../mppc.o ../licence.o ../bitmap.o ../channels.o ../pstcache.o LDFLAGS = -lvga -lcrypto #LDFLAGS = -lm /usr/local/lib/libvga.a /usr/lib/libcrypto.a #LDFLAGS = -lvga /usr/lib/libcrypto.a all: svgard svgard: svgawin.o $(RESTOBJ) $(CC) -o svgardesktop svgawin.o $(RESTOBJ) $(LDFLAGS) strip svgardesktop #rest: $(RESTOBJ) #rest: tcp.o iso.o mcs.o secure.o rdp.o rdp5.o orders.o cache.o mppc.o licence.o bitmap.o channels.o pstcache.o rest: ../tcp.c ../iso.c ../mcs.c ../secure.c ../rdp.c ../rdp5.c ../orders.c ../cache.c ../mppc.c ../licence.c ../bitmap.c ../channels.c ../pstcache.c $(CC) $(CFLAGS) -c ../tcp.c -o ../tcp.o $(CC) $(CFLAGS) -c ../iso.c -o ../iso.o $(CC) $(CFLAGS) -c ../mcs.c -o ../mcs.o $(CC) $(CFLAGS) -c ../secure.c -o ../secue.o $(CC) $(CFLAGS) -c ../rdp.c -o ../rdp.o $(CC) $(CFLAGS) -c ../rdp5.c -o ../rdp5.o $(CC) $(CFLAGS) -c ../orders.c -o ../orders.o $(CC) $(CFLAGS) -c ../cache.c -o ../cache.o $(CC) $(CFLAGS) -c ../mppc.c -o ../mppc.o $(CC) $(CFLAGS) -c ../licence.c -o ../licence.o $(CC) $(CFLAGS) -c ../bitmap.c -o ../bitmap.o $(CC) $(CFLAGS) -c ../channels.c -o ../channels.o $(CC) $(CFLAGS) -c ../pstcache.c -o ../pstcache.o svgawin.o: svgawin.c $(CC) $(CFLAGS) -c $*.c clean: rm svgardesktop rm *.o rm ../*.o Index: svgareadme.txt =================================================================== RCS file: /cvsroot/rdesktop/rdesktop/uiports/svgareadme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** svgareadme.txt 9 Jul 2004 17:27:28 -0000 1.1 --- svgareadme.txt 7 Feb 2005 00:54:10 -0000 1.2 *************** *** 1,35 **** ! This is the svga ui port ! svgalib should be installed ! tested with versions 1.4.3, 1.9.x ! ! svgardesktopbuild.sh can be edited to change file localtions or endianness ! run ./svgardesktopbuild.sh in this directory to compile it ! ! svgareadme.txt - notes, this file ! svgardesktopbuild.sh - script to build ! svgawin.c - ui lib ! ! svgalib has some support for acceleration but most drivers ! do not support it. I hope they fix this. ! The ones that do are Cirus Logic and ATI Mach 32 cards. ! If running on really slow hardware(486), use one of these cards, ! it improves performance alot. ! ! run ./svgardesktop with no parameters to see a list of ! commnad line options ! ! You will need to modify the libvga.config file most likely. ! Its in /etc/vga. ! Here is what mine looks like. ! BOF ! mouse imps2 ! mouse_fake_kbd_event 112 113 ! mouse_accel_mult 1.5 ! mouse_accel_type normal ! HorizSync 31.5 56.0 ! VertRefresh 50 90 ! nosigint ! EOF ! The mouse_fake_kbd_event line makes the wheel mouse work. ! ! Jay --- 1,39 ---- ! This is the svga ui port ! send any fixes or improvments to me Jay Sorg([email protected]) ! svgalib should be installed ! tested with versions 1.4.3, 1.9.x ! ! thanks to ! Donald Gordon - original work ! Peter Nikolow - misc fixes ! ! run make -f makefile_svga to compile it ! ! svgareadme.txt - notes, this file ! makefile_svga - makefile ! svgawin.c - ui lib ! ! svgalib has some support for acceleration but most drivers ! do not support it. I hope they fix this. ! The ones that do are Cirus Logic and ATI Mach 32 cards. ! If running on really slow hardware(486), use one of these cards, ! it improves performance alot. ! ! run ./svgardesktop with no parameters to see a list of ! commnad line options ! ! You will need to modify the libvga.config file most likely. ! Its in /etc/vga. ! Here is what mine looks like. ! BOF ! mouse imps2 ! mouse_fake_kbd_event 112 113 ! mouse_accel_mult 1.5 ! mouse_accel_type normal ! HorizSync 31.5 56.0 ! VertRefresh 50 90 ! nosigint ! EOF ! The mouse_fake_kbd_event line makes the wheel mouse work. ! ! Jay Index: svgawin.c =================================================================== RCS file: /cvsroot/rdesktop/rdesktop/uiports/svgawin.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** svgawin.c 9 Jul 2004 17:27:56 -0000 1.1 --- svgawin.c 7 Feb 2005 00:54:10 -0000 1.2 *************** *** 31,34 **** --- 31,39 ---- + #include <sys/ioctl.h> + #include <linux/keyboard.h> + #include <linux/kd.h> + #include <fcntl.h> + extern int g_tcp_port_rdp; int g_use_rdp5 = 0; *************** *** 60,63 **** --- 65,73 ---- static int g_server_Bpp = 1; + /* Keyboard LEDS */ + static int numlock; + static int capslock; + static int scrolllock; + // this is non null if vgalib has non accel functions available // reading from video memory is sooo slow *************** *** 120,123 **** --- 130,156 ---- myrect* head_rect = 0; + // Keyboard stuff - PeterS + + static void setled(int mask, int state) + { + int fd; + long int leds; + + if (( fd=open("/dev/console", O_NOCTTY)) != -1 ) + { + if (ioctl (fd, KDGETLED, &leds) != -1) + { + leds &= 7; + if (state) + leds |= mask; + else + leds &= ~mask; + ioctl (fd, KDSETLED, leds); + } + close(fd); + } + } + + //***************************************************************************** // do a raster op *************** *** 735,738 **** --- 768,790 ---- rdpkey = scancode; ext = 0; + + // Keyboard LEDS + if ((scancode == SCANCODE_CAPSLOCK) && pressed) + { + capslock = !capslock; + setled(LED_CAP, capslock); + } + if ((scancode == SCANCODE_SCROLLLOCK) && pressed) + { + scrolllock = !scrolllock; + setled(LED_SCR, scrolllock); + } + + if ((scancode == SCANCODE_NUMLOCK) && pressed) + { + numlock = !numlock; + setled(LED_NUM, numlock); + } + switch (scancode) { *************** *** 751,760 **** case SCANCODE_RIGHTCONTROL: rdpkey = 0x1d; break; // right ctrl case SCANCODE_RIGHTALT: rdpkey = 0x38; break; // right alt ! case SCANCODE_LEFTWIN: rdpkey = 0; break; // left win ! case SCANCODE_RIGHTWIN: rdpkey = 0; break; // right win ! case 127: rdpkey = 0; break; // menu key ! case SCANCODE_PRINTSCREEN: rdpkey = 0; break; // print screen ! case SCANCODE_BREAK: rdpkey = 0; break; // break ! case SCANCODE_SCROLLLOCK: rdpkey = 0; break; // scroll lock case 112: // mouse down { --- 803,821 ---- case SCANCODE_RIGHTCONTROL: rdpkey = 0x1d; break; // right ctrl case SCANCODE_RIGHTALT: rdpkey = 0x38; break; // right alt ! case SCANCODE_LEFTWIN: rdpkey = 0x5b; ext = KBD_FLAG_EXT; break; // left win ! case SCANCODE_RIGHTWIN: rdpkey = 0x5c; ext = KBD_FLAG_EXT; break; // right win ! case 127: rdpkey = 0x5d; ext = KBD_FLAG_EXT; break; // menu key ! case SCANCODE_PRINTSCREEN: rdpkey = 0x37; ext = KBD_FLAG_EXT; break; // print screen ! case SCANCODE_BREAK: //rdpkey = 0; break; // break ! { ! if (pressed) ! { ! ext = KBD_FLAG_EXT; ! rdp_send_input(0, RDP_INPUT_SCANCODE, RDP_KEYPRESS | ext, 0x46, 0); ! rdp_send_input(0, RDP_INPUT_SCANCODE, RDP_KEYPRESS | ext, 0xc6, 0); ! } ! rdpkey = 0; ! } ! case SCANCODE_SCROLLLOCK: rdpkey = 0x46; break; // scroll lock case 112: // mouse down { *************** *** 775,778 **** --- 836,840 ---- else rdp_send_input(0, RDP_INPUT_SCANCODE, RDP_KEYRELEASE | ext, rdpkey, 0); + } ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl