OpenSDE Packages Database (without history before r20070)
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.

62 lines
1.7 KiB

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