Mercurial > sdl-ios-xcode
annotate src/joystick/SDL_sysjoystick.h @ 1321:e05bc5d315e3
Date: Wed, 1 Feb 2006 18:20:33 -0800
From: Eric Wing
Subject: SDL/Universal Binary updates
Hi Sam,
Attached is a big set of changes to the Xcode projects to support
Universal Binaries. I have also included .dmgs that include the
prebuilt frameworks.
Ryan, I also updated SMPEG which is also in the package.
The SDL and smpeg binaries were built against the CVS version (pulled
maybe a month ago?).
I do not have an Intel Mac to test on so I have no idea if this stuff
actually works. However, Christian Walther has been a big help in
testing 10.2.8 and 10.3.9 so I'm fairly confident we got the build
settings correct for at least PPC.
I have attempted to document the important things for producing these
Universal Binaries. Documentation is somewhat scattered through out
everything, but there is a big centralized piece of documentation in
the UniversalBinaryNotes.rtf in the SDL.dmg.
As far as Universal Binaries are concerned, the big things were:
- Build with gcc 3.3 on PPC, 4.0 on Intel.
- We couldn't get any of the MMX/SSE code to compile/link (SDL and
smpeg).
- All 3rd party dependencies had to be rebuilt as Universal
There were also a bunch of non-Universal things that have been updated:
- I converted the SDL-satellites to create .dmg's instead of .pkg
installers
- Updated all 3rd party static libraries with current versions. (I
think libpng was the most dramatic going from 1.0.? to 1.2.8 with API
breakage. I haven't found any problems so far in doing this.)
- Changed some compiler optimization settings
- Finally updated the exports list for SDL_mixer
- Tried to include a static smpeg in SDL_mixer (multiple build
variants in Xcode project now)
- Enabled Altivec in SDL (we forgot to add the flags to Xcode last time)
- More documentation
Since so many things have changed, there might be new problems
introduced. The big issue I've found so far is with SDL_mixer. As I
mentioned on the mailing list, MP3's produce an assertion failure.
And the MikMod problem reported on Bugzilla continues to persist.
There's probably a bunch of other stuff I'm forgetting. There really
were hundreds of little things I mucked with so it's hard to remember
them all.
If you have any questions, feel free to ask.
Thanks,
Eric
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 02 Feb 2006 06:26:39 +0000 |
parents | c9b51268668f |
children | 3692456e7b0f |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0 | 7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
13 Lesser General Public License for more details. |
0 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
252
e8157fcb3114
Updated the source with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
22 | |
23 /* This is the system specific header for the SDL joystick API */ | |
24 | |
25 #include "SDL_joystick.h" | |
26 | |
27 /* The SDL joystick structure */ | |
28 struct _SDL_Joystick { | |
29 Uint8 index; /* Device index */ | |
30 const char *name; /* Joystick name - system dependent */ | |
31 | |
32 int naxes; /* Number of axis controls on the joystick */ | |
33 Sint16 *axes; /* Current axis states */ | |
34 | |
35 int nhats; /* Number of hats on the joystick */ | |
36 Uint8 *hats; /* Current hat states */ | |
37 | |
38 int nballs; /* Number of trackballs on the joystick */ | |
39 struct balldelta { | |
40 int dx; | |
41 int dy; | |
42 } *balls; /* Current ball motion deltas */ | |
43 | |
44 int nbuttons; /* Number of buttons on the joystick */ | |
45 Uint8 *buttons; /* Current button states */ | |
46 | |
47 struct joystick_hwdata *hwdata; /* Driver dependent information */ | |
48 | |
49 int ref_count; /* Reference count for multiple opens */ | |
50 }; | |
51 | |
52 /* Function to scan the system for joysticks. | |
53 * Joystick 0 should be the system default joystick. | |
54 * This function should return the number of available joysticks, or -1 | |
55 * on an unrecoverable fatal error. | |
56 */ | |
57 extern int SDL_SYS_JoystickInit(void); | |
58 | |
59 /* Function to get the device-dependent name of a joystick */ | |
60 extern const char *SDL_SYS_JoystickName(int index); | |
61 | |
62 /* Function to open a joystick for use. | |
63 The joystick to open is specified by the index field of the joystick. | |
64 This should fill the nbuttons and naxes fields of the joystick structure. | |
65 It returns 0, or -1 if there is an error. | |
66 */ | |
67 extern int SDL_SYS_JoystickOpen(SDL_Joystick *joystick); | |
68 | |
69 /* Function to update the state of a joystick - called as a device poll. | |
70 * This function shouldn't update the joystick structure directly, | |
71 * but instead should call SDL_PrivateJoystick*() to deliver events | |
72 * and update joystick device state. | |
73 */ | |
74 extern void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick); | |
75 | |
76 /* Function to close a joystick after use */ | |
77 extern void SDL_SYS_JoystickClose(SDL_Joystick *joystick); | |
78 | |
79 /* Function to perform any system-specific joystick related cleanup */ | |
80 extern void SDL_SYS_JoystickQuit(void); | |
81 |