diff options
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_io.c')
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_io.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c index dda1ff8ef..303c6e3d3 100644 --- a/hw/xfree86/os-support/linux/lnx_io.c +++ b/hw/xfree86/os-support/linux/lnx_io.c @@ -90,9 +90,10 @@ KDKBDREP_ioctl_ok(int rate, int delay) { /* don't change, just test */ kbdrep_s.rate = -1; kbdrep_s.delay = -1; - if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) { + if (ioctl( 0, KDKBDREP, &kbdrep_s )) { return 0; } + /* do the change */ if (rate == 0) /* switch repeat off */ kbdrep_s.rate = 0; @@ -104,7 +105,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) { if (kbdrep_s.delay < 1) kbdrep_s.delay = 1; - if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) { + if (ioctl( 0, KDKBDREP, &kbdrep_s )) { return 0; } @@ -129,9 +130,8 @@ KIOCSRATE_ioctl_ok(int rate, int delay) { if (kbdrate_s.rate > 50) kbdrate_s.rate = 50; - if (ioctl( fd, KIOCSRATE, &kbdrate_s )) { - return 0; - } + if (ioctl( fd, KIOCSRATE, &kbdrate_s )) + return 0; close( fd ); @@ -143,7 +143,12 @@ KIOCSRATE_ioctl_ok(int rate, int delay) { #undef rate +#if NeedFunctionPrototypes void xf86SetKbdRepeat(char rad) +#else +void xf86SetKbdRepeat(rad) +char rad; +#endif { #ifdef __sparc__ int rate = 500; /* Default rate */ @@ -173,6 +178,7 @@ void xf86SetKbdRepeat(char rad) if (xf86Info.kbdDelay >= 0) delay = xf86Info.kbdDelay; + if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */ return; |