* yet more dir-less .cache DEP updates
[t2sde.git] / package / games / tuxkart / non-x86-ioperm.patch.disabled
blob72ee5d3eac645f08cf46e9b0e43543c3f71ff732
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/tuxkart/non-x86-ioperm.patch.disabled
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 No (?) non-x86 has ioperm (the direct IO-Port access mechanism) - so
15 we disable this (stereo shutter glass?) code.
17   - 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
31  static unsigned int lastGLUTKeystroke = 0 ;
33 @@ -197,6 +199,7 @@
34        return ;
35      }
37 +#ifdef __i386__
38      fprintf ( stderr, "Requesting control of parallel printer port...\n" ) ;
39   
40      int res = ioperm ( LPBASE, 8, 1 ) ;
41 @@ -212,13 +215,18 @@
42        fprintf ( stderr, "Stereo Enabled!\n" ) ;
43        stereo = -1 ;
44      }
45 +#else
46 +    stereo = 0;
47 +#endif
48    }
50 +#ifdef __i386__
51    if ( stereo != 0 )
52    {
53      outb ( (stereo==-1) ? ~3 : ~2, LPBASE+2 ) ;
54      stereo = -stereo ;
55    }
56 +#endif
57  }