annotate include/SDL_config.h @ 1551:02e19471a694

Fixed bug #4 [Note: I'm applying this patch since it's a cleaner version of what's already implemented, and supports this controller on older kernels. I'll ask to make sure this doesn't break on the new kernels where it's no longer necessary] Date: Mon, 21 Mar 2005 09:41:11 -0500 From: Chris Nelson Subject: SDL Patch Hey, Ryan. I submitted the following patch about a year ago. It's just a simple patch for the linux port, to make multiple joysticks each appear to SDL as their own device, if they are on the same USB port (specifically, these guys <http://www.consoleplus.co.uk/product_info.php?pName=super-joybox-5-quad-joypad-converter>, which allow 4 Playstation2 controllers to be accessed via a single USB port). Without this patch, SDL pretty much drops the ball, and reports that there are 4 joysticks available when less than that number are plugged in. My work built upon the work of another person with the same device. When I submitted the patch to the list, he tested it, but it didn't work for him, so the patch was never accepted. Maybe about 3 times in the past year, I've tried to email the guy, to see if he couldn't run my new version, complete with debug code to diagnose the problem he was having. He never got back to me. So, I'm attaching the patch. I wish I knew why it didn't work for him, but I've been using it for the last year with no problems. Let me know if you need any more information, or have any ideas as to how I could test it. I'd like to see it in the tree, but I want to make sure it works. -Chris
author Sam Lantinga <slouken@libsdl.org>
date Sun, 19 Mar 2006 06:31:34 +0000
parents 38c1eb6b0083
children 3ba88cb7eb1b
rev   line source
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 #ifndef _SDL_config_h
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 #define _SDL_config_h
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25
1422
d2ee8da60262 Added pre-configured versions of SDL_config.h for various platforms
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
26 #include "SDL_platform.h"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
28 /* Add any platform that doesn't build using the configure system */
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
29 #if defined(__AMIGA__)
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
30 #include "SDL_config_amiga.h"
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
31 #elif defined(__DREAMCAST__)
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
32 #include "SDL_config_dreamcast.h"
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
33 #elif defined(__MACOS__)
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
34 #include "SDL_config_macos.h"
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
35 #elif defined(__MACOSX__)
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
36 #include "SDL_config_macosx.h"
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
37 #elif defined(__WIN32__)
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
38 #include "SDL_config_win32.h"
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
39 #elif defined(__OS2__)
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
40 #include "SDL_config_os2.h"
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
41 #else
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
42 /* This is the minimal configuration that can be used to build SDL */
1532
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1484
diff changeset
43
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1484
diff changeset
44 #include <stdarg.h>
1424
7a610f25c12f Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents: 1422
diff changeset
45
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
46 typedef signed char int8_t;
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
47 typedef unsigned char uint8_t;
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
48 typedef signed short int16_t;
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
49 typedef unsigned short uint16_t;
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
50 typedef signed int int32_t;
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
51 typedef unsigned int uint32_t;
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
52 typedef unsigned int size_t;
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
53 typedef unsigned long uintptr_t;
1484
b2b476a4a73c Added documentation on how to build a completely useless SDL library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1442
diff changeset
54
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
55 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
56 #define SDL_AUDIO_DRIVER_DUMMY 1
1484
b2b476a4a73c Added documentation on how to build a completely useless SDL library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1442
diff changeset
57
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
58 /* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
59 #define SDL_CDROM_DISABLED 1
1484
b2b476a4a73c Added documentation on how to build a completely useless SDL library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1442
diff changeset
60
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
61 /* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
62 #define SDL_JOYSTICK_DISABLED 1
1484
b2b476a4a73c Added documentation on how to build a completely useless SDL library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1442
diff changeset
63
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
64 /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
65 #define SDL_LOADSO_DISABLED 1
1484
b2b476a4a73c Added documentation on how to build a completely useless SDL library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1442
diff changeset
66
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
67 /* Enable the stub thread support (src/thread/generic/\*.c) */
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
68 #define SDL_THREADS_DISABLED 1
1484
b2b476a4a73c Added documentation on how to build a completely useless SDL library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1442
diff changeset
69
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
70 /* Enable the stub timer support (src/timer/dummy/\*.c) */
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
71 #define SDL_TIMERS_DISABLED 1
1484
b2b476a4a73c Added documentation on how to build a completely useless SDL library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1442
diff changeset
72
1533
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
73 /* Enable the dummy video driver (src/video/dummy/\*.c) */
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
74 #define SDL_VIDEO_DRIVER_DUMMY 1
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
75
38c1eb6b0083 By default all the real targets have dummy audio/video and disk audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1532
diff changeset
76 #endif /* platform config */
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
77
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
78 #endif /* _SDL_config_h */