mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/kasc/tuxkart/non-x86-ioperm.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. No (?) non-x86 has ioperm (the direct IO-Port access mechanism) - so
  20. we disable this (stereo shutter glass?) code.
  21. - Rene Rebe <rene@exactcode.de>
  22. --- tuxkart-0.2.0/src/gfx.cxx.orig 2001-11-10 00:32:52.000000000 +0100
  23. +++ tuxkart-0.2.0/src/gfx.cxx 2003-11-22 11:08:12.000000000 +0100
  24. @@ -4,9 +4,11 @@
  25. #ifndef WIN32
  26. #include <unistd.h>
  27. #include <string.h>
  28. +#ifdef __i386__
  29. #include <sys/io.h>
  30. #include <sys/perm.h>
  31. #endif
  32. +#endif
  33. static unsigned int lastGLUTKeystroke = 0 ;
  34. @@ -197,6 +199,7 @@
  35. return ;
  36. }
  37. +#ifdef __i386__
  38. fprintf ( stderr, "Requesting control of parallel printer port...\n" ) ;
  39. int res = ioperm ( LPBASE, 8, 1 ) ;
  40. @@ -212,13 +215,18 @@
  41. fprintf ( stderr, "Stereo Enabled!\n" ) ;
  42. stereo = -1 ;
  43. }
  44. +#else
  45. + stereo = 0;
  46. +#endif
  47. }
  48. +#ifdef __i386__
  49. if ( stereo != 0 )
  50. {
  51. outb ( (stereo==-1) ? ~3 : ~2, LPBASE+2 ) ;
  52. stereo = -stereo ;
  53. }
  54. +#endif
  55. }