diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-07-18 17:18:31 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-07-18 17:18:31 +0000 |
commit | 60642ca2e3ec60c9bc39ed820bd759e9a58d4d85 (patch) | |
tree | a262d4afaf8210dd3d1cf6fb4b8d187b253e4658 /perl-install/c | |
parent | 74e57fc68e455eb20d26ba781dc67588ea39d35c (diff) | |
download | drakx-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.tar drakx-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.tar.gz drakx-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.tar.bz2 drakx-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.tar.xz drakx-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.zip |
no_comment
Diffstat (limited to 'perl-install/c')
-rw-r--r-- | perl-install/c/stuff.xs.pm | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 3967392fb..87ee1c98e 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -27,6 +27,7 @@ print ' #include <gdk/gdkx.h> #include <X11/Xlib.h> #include <X11/extensions/xf86misc.h> +#include <term.h> #define SECTORSIZE 512 '; @@ -55,6 +56,22 @@ FD_t fd2FD_t(int fd) { return f; } +void initIMPS2() { + unsigned char imps2_s1[] = { 243, 200, 243, 100, 243, 80, }; + unsigned char imps2_s2[] = { 246, 230, 244, 243, 100, 232, 3, }; + + int fd = open("/dev/cdrom", O_WRONLY); + if (fd < 0) return; + + write (fd, imps2_s1, sizeof (imps2_s1)); + usleep (30000); + write (fd, imps2_s2, sizeof (imps2_s2)); + usleep (30000); + tcflush (fd, TCIFLUSH); + tcdrain(fd); +} + + '; print ' @@ -81,18 +98,20 @@ Xtest(display) RETVAL void -setMouseMicrosoft(display) +setMouseLive(display, type) char *display + int type CODE: { XF86MiscMouseSettings mseinfo; Display *d = XOpenDisplay(display); if (d) { if (XF86MiscGetMouseSettings(d, &mseinfo) == True) { - mseinfo.type = MTYPE_MICROSOFT; - mseinfo.flags = 128; + mseinfo.type = type; + mseinfo.flags |= 128; XF86MiscSetMouseSettings(d, &mseinfo); XFlush(d); + if (type == MTYPE_IMPS2) initIMPS2(); } } } |