annotate src/joystick/win32/SDL_dxjoystick.c @ 3011:8f4ed5ec2b06

I ran a global "make indent" it modified the following files.
author Bob Pendleton <bob@pendleton.com>
date Fri, 09 Jan 2009 20:43:30 +0000
parents 99210400e8b9
children 8cc00819c8d6
rev   line source
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
2859
99210400e8b9 Updated copyright date
Sam Lantinga <slouken@libsdl.org>
parents: 2770
diff changeset
3 Copyright (C) 1997-2009 Sam Lantinga
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 #include "SDL_config.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 #ifdef SDL_JOYSTICK_DINPUT
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 /* DirectInput joystick driver; written by Glenn Maynard, based on Andrei de
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 * A. Formiga's WINMM driver.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 *
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 * Hats and sliders are completely untested; the app I'm writing this for mostly
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 * doesn't use them and I don't own any joysticks with them.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 *
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 * We don't bother to use event notification here. It doesn't seem to work
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 * with polled devices, and it's fine to call IDirectInputDevice2_GetDeviceData and
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 * let it return 0 events. */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 #include "SDL_error.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 #include "SDL_events.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 #include "SDL_joystick.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 #include "../SDL_sysjoystick.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 #include "../SDL_joystick_c.h"
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
41 #define INITGUID /* Only set here, if set twice will cause mingw32 to break. */
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
42 #include "SDL_dxjoystick_c.h"
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
43
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44
2761
0c544c2eff77 Almost got this compiling on Cygwin32, just needs DirectInput 7
Sam Lantinga <slouken@libsdl.org>
parents: 2760
diff changeset
45 #ifndef DIDFT_OPTIONAL
0c544c2eff77 Almost got this compiling on Cygwin32, just needs DirectInput 7
Sam Lantinga <slouken@libsdl.org>
parents: 2760
diff changeset
46 #define DIDFT_OPTIONAL 0x80000000
0c544c2eff77 Almost got this compiling on Cygwin32, just needs DirectInput 7
Sam Lantinga <slouken@libsdl.org>
parents: 2760
diff changeset
47 #endif
0c544c2eff77 Almost got this compiling on Cygwin32, just needs DirectInput 7
Sam Lantinga <slouken@libsdl.org>
parents: 2760
diff changeset
48
0c544c2eff77 Almost got this compiling on Cygwin32, just needs DirectInput 7
Sam Lantinga <slouken@libsdl.org>
parents: 2760
diff changeset
49
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 #define INPUT_QSIZE 32 /* Buffer up to 32 input messages */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 #define MAX_JOYSTICKS 8
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52 #define AXIS_MIN -32768 /* minimum value for axis coordinate */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53 #define AXIS_MAX 32767 /* maximum value for axis coordinate */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 #define JOY_AXIS_THRESHOLD (((AXIS_MAX)-(AXIS_MIN))/100) /* 1% motion */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
56 /* external variables referenced. */
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
57 extern HWND SDL_HelperWindow;
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
58
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
59
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
60 /* local variables */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
61 static LPDIRECTINPUT dinput = NULL;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
62 extern HRESULT(WINAPI * DInputCreate) (HINSTANCE hinst, DWORD dwVersion,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
63 LPDIRECTINPUT * ppDI,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
64 LPUNKNOWN punkOuter);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
65 static DIDEVICEINSTANCE SYS_Joystick[MAX_JOYSTICKS]; /* array to hold joystick ID values */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
66 static int SYS_NumJoysticks;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
67 static HINSTANCE DInputDLL = NULL;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
68
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
69
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
70 /* local prototypes */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
71 static void SetDIerror(const char *function, HRESULT code);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
72 static BOOL CALLBACK EnumJoysticksCallback(const DIDEVICEINSTANCE *
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
73 pdidInstance, VOID * pContext);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
74 static BOOL CALLBACK EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE dev,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
75 LPVOID pvRef);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
76 static Uint8 TranslatePOV(DWORD value);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
77 static int SDL_PrivateJoystickAxis_Int(SDL_Joystick * joystick, Uint8 axis,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
78 Sint16 value);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
79 static int SDL_PrivateJoystickHat_Int(SDL_Joystick * joystick, Uint8 hat,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
80 Uint8 value);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
81 static int SDL_PrivateJoystickButton_Int(SDL_Joystick * joystick,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
82 Uint8 button, Uint8 state);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
83
2760
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
84 /* Taken from Wine - Thanks! */
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
85 DIOBJECTDATAFORMAT dfDIJoystick2[] = {
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
86 {&GUID_XAxis, DIJOFS_X, DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
87 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
88 {&GUID_YAxis, DIJOFS_Y, DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
89 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
90 {&GUID_ZAxis, DIJOFS_Z, DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
91 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
92 {&GUID_RxAxis, DIJOFS_RX, DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
93 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
94 {&GUID_RyAxis, DIJOFS_RY, DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
95 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
96 {&GUID_RzAxis, DIJOFS_RZ, DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
97 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
98 {&GUID_Slider, DIJOFS_SLIDER(0),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
99 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
100 {&GUID_Slider, DIJOFS_SLIDER(1),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
101 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
102 {&GUID_POV, DIJOFS_POV(0), DIDFT_OPTIONAL | DIDFT_POV | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
103 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
104 {&GUID_POV, DIJOFS_POV(1), DIDFT_OPTIONAL | DIDFT_POV | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
105 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
106 {&GUID_POV, DIJOFS_POV(2), DIDFT_OPTIONAL | DIDFT_POV | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
107 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
108 {&GUID_POV, DIJOFS_POV(3), DIDFT_OPTIONAL | DIDFT_POV | DIDFT_ANYINSTANCE,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
109 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
110 {NULL, DIJOFS_BUTTON(0),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
111 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
112 {NULL, DIJOFS_BUTTON(1),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
113 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
114 {NULL, DIJOFS_BUTTON(2),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
115 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
116 {NULL, DIJOFS_BUTTON(3),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
117 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
118 {NULL, DIJOFS_BUTTON(4),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
119 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
120 {NULL, DIJOFS_BUTTON(5),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
121 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
122 {NULL, DIJOFS_BUTTON(6),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
123 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
124 {NULL, DIJOFS_BUTTON(7),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
125 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
126 {NULL, DIJOFS_BUTTON(8),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
127 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
128 {NULL, DIJOFS_BUTTON(9),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
129 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
130 {NULL, DIJOFS_BUTTON(10),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
131 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
132 {NULL, DIJOFS_BUTTON(11),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
133 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
134 {NULL, DIJOFS_BUTTON(12),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
135 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
136 {NULL, DIJOFS_BUTTON(13),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
137 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
138 {NULL, DIJOFS_BUTTON(14),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
139 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
140 {NULL, DIJOFS_BUTTON(15),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
141 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
142 {NULL, DIJOFS_BUTTON(16),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
143 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
144 {NULL, DIJOFS_BUTTON(17),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
145 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
146 {NULL, DIJOFS_BUTTON(18),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
147 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
148 {NULL, DIJOFS_BUTTON(19),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
149 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
150 {NULL, DIJOFS_BUTTON(20),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
151 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
152 {NULL, DIJOFS_BUTTON(21),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
153 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
154 {NULL, DIJOFS_BUTTON(22),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
155 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
156 {NULL, DIJOFS_BUTTON(23),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
157 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
158 {NULL, DIJOFS_BUTTON(24),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
159 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
160 {NULL, DIJOFS_BUTTON(25),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
161 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
162 {NULL, DIJOFS_BUTTON(26),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
163 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
164 {NULL, DIJOFS_BUTTON(27),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
165 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
166 {NULL, DIJOFS_BUTTON(28),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
167 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
168 {NULL, DIJOFS_BUTTON(29),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
169 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
170 {NULL, DIJOFS_BUTTON(30),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
171 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
172 {NULL, DIJOFS_BUTTON(31),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
173 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
174 {NULL, DIJOFS_BUTTON(32),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
175 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
176 {NULL, DIJOFS_BUTTON(33),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
177 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
178 {NULL, DIJOFS_BUTTON(34),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
179 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
180 {NULL, DIJOFS_BUTTON(35),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
181 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
182 {NULL, DIJOFS_BUTTON(36),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
183 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
184 {NULL, DIJOFS_BUTTON(37),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
185 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
186 {NULL, DIJOFS_BUTTON(38),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
187 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
188 {NULL, DIJOFS_BUTTON(39),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
189 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
190 {NULL, DIJOFS_BUTTON(40),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
191 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
192 {NULL, DIJOFS_BUTTON(41),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
193 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
194 {NULL, DIJOFS_BUTTON(42),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
195 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
196 {NULL, DIJOFS_BUTTON(43),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
197 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
198 {NULL, DIJOFS_BUTTON(44),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
199 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
200 {NULL, DIJOFS_BUTTON(45),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
201 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
202 {NULL, DIJOFS_BUTTON(46),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
203 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
204 {NULL, DIJOFS_BUTTON(47),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
205 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
206 {NULL, DIJOFS_BUTTON(48),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
207 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
208 {NULL, DIJOFS_BUTTON(49),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
209 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
210 {NULL, DIJOFS_BUTTON(50),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
211 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
212 {NULL, DIJOFS_BUTTON(51),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
213 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
214 {NULL, DIJOFS_BUTTON(52),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
215 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
216 {NULL, DIJOFS_BUTTON(53),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
217 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
218 {NULL, DIJOFS_BUTTON(54),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
219 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
220 {NULL, DIJOFS_BUTTON(55),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
221 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
222 {NULL, DIJOFS_BUTTON(56),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
223 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
224 {NULL, DIJOFS_BUTTON(57),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
225 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
226 {NULL, DIJOFS_BUTTON(58),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
227 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
228 {NULL, DIJOFS_BUTTON(59),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
229 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
230 {NULL, DIJOFS_BUTTON(60),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
231 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
232 {NULL, DIJOFS_BUTTON(61),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
233 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
234 {NULL, DIJOFS_BUTTON(62),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
235 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
236 {NULL, DIJOFS_BUTTON(63),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
237 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
238 {NULL, DIJOFS_BUTTON(64),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
239 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
240 {NULL, DIJOFS_BUTTON(65),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
241 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
242 {NULL, DIJOFS_BUTTON(66),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
243 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
244 {NULL, DIJOFS_BUTTON(67),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
245 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
246 {NULL, DIJOFS_BUTTON(68),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
247 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
248 {NULL, DIJOFS_BUTTON(69),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
249 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
250 {NULL, DIJOFS_BUTTON(70),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
251 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
252 {NULL, DIJOFS_BUTTON(71),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
253 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
254 {NULL, DIJOFS_BUTTON(72),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
255 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
256 {NULL, DIJOFS_BUTTON(73),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
257 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
258 {NULL, DIJOFS_BUTTON(74),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
259 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
260 {NULL, DIJOFS_BUTTON(75),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
261 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
262 {NULL, DIJOFS_BUTTON(76),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
263 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
264 {NULL, DIJOFS_BUTTON(77),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
265 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
266 {NULL, DIJOFS_BUTTON(78),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
267 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
268 {NULL, DIJOFS_BUTTON(79),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
269 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
270 {NULL, DIJOFS_BUTTON(80),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
271 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
272 {NULL, DIJOFS_BUTTON(81),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
273 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
274 {NULL, DIJOFS_BUTTON(82),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
275 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
276 {NULL, DIJOFS_BUTTON(83),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
277 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
278 {NULL, DIJOFS_BUTTON(84),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
279 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
280 {NULL, DIJOFS_BUTTON(85),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
281 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
282 {NULL, DIJOFS_BUTTON(86),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
283 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
284 {NULL, DIJOFS_BUTTON(87),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
285 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
286 {NULL, DIJOFS_BUTTON(88),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
287 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
288 {NULL, DIJOFS_BUTTON(89),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
289 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
290 {NULL, DIJOFS_BUTTON(90),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
291 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
292 {NULL, DIJOFS_BUTTON(91),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
293 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
294 {NULL, DIJOFS_BUTTON(92),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
295 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
296 {NULL, DIJOFS_BUTTON(93),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
297 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
298 {NULL, DIJOFS_BUTTON(94),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
299 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
300 {NULL, DIJOFS_BUTTON(95),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
301 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
302 {NULL, DIJOFS_BUTTON(96),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
303 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
304 {NULL, DIJOFS_BUTTON(97),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
305 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
306 {NULL, DIJOFS_BUTTON(98),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
307 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
308 {NULL, DIJOFS_BUTTON(99),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
309 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
310 {NULL, DIJOFS_BUTTON(100),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
311 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
312 {NULL, DIJOFS_BUTTON(101),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
313 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
314 {NULL, DIJOFS_BUTTON(102),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
315 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
316 {NULL, DIJOFS_BUTTON(103),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
317 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
318 {NULL, DIJOFS_BUTTON(104),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
319 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
320 {NULL, DIJOFS_BUTTON(105),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
321 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
322 {NULL, DIJOFS_BUTTON(106),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
323 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
324 {NULL, DIJOFS_BUTTON(107),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
325 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
326 {NULL, DIJOFS_BUTTON(108),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
327 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
328 {NULL, DIJOFS_BUTTON(109),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
329 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
330 {NULL, DIJOFS_BUTTON(110),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
331 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
332 {NULL, DIJOFS_BUTTON(111),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
333 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
334 {NULL, DIJOFS_BUTTON(112),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
335 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
336 {NULL, DIJOFS_BUTTON(113),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
337 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
338 {NULL, DIJOFS_BUTTON(114),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
339 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
340 {NULL, DIJOFS_BUTTON(115),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
341 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
342 {NULL, DIJOFS_BUTTON(116),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
343 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
344 {NULL, DIJOFS_BUTTON(117),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
345 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
346 {NULL, DIJOFS_BUTTON(118),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
347 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
348 {NULL, DIJOFS_BUTTON(119),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
349 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
350 {NULL, DIJOFS_BUTTON(120),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
351 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
352 {NULL, DIJOFS_BUTTON(121),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
353 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
354 {NULL, DIJOFS_BUTTON(122),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
355 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
356 {NULL, DIJOFS_BUTTON(123),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
357 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
358 {NULL, DIJOFS_BUTTON(124),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
359 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
360 {NULL, DIJOFS_BUTTON(125),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
361 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
362 {NULL, DIJOFS_BUTTON(126),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
363 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
364 {NULL, DIJOFS_BUTTON(127),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
365 DIDFT_OPTIONAL | DIDFT_BUTTON | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
366 {&GUID_XAxis, FIELD_OFFSET(DIJOYSTATE2, lVX),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
367 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
368 {&GUID_YAxis, FIELD_OFFSET(DIJOYSTATE2, lVY),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
369 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
370 {&GUID_ZAxis, FIELD_OFFSET(DIJOYSTATE2, lVZ),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
371 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
372 {&GUID_RxAxis, FIELD_OFFSET(DIJOYSTATE2, lVRx),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
373 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
374 {&GUID_RyAxis, FIELD_OFFSET(DIJOYSTATE2, lVRy),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
375 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
376 {&GUID_RzAxis, FIELD_OFFSET(DIJOYSTATE2, lVRz),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
377 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
378 {&GUID_Slider, FIELD_OFFSET(DIJOYSTATE2, rglVSlider[0]),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
379 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
380 {&GUID_Slider, FIELD_OFFSET(DIJOYSTATE2, rglVSlider[1]),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
381 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
382 {&GUID_XAxis, FIELD_OFFSET(DIJOYSTATE2, lAX),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
383 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
384 {&GUID_YAxis, FIELD_OFFSET(DIJOYSTATE2, lAY),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
385 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
386 {&GUID_ZAxis, FIELD_OFFSET(DIJOYSTATE2, lAZ),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
387 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
388 {&GUID_RxAxis, FIELD_OFFSET(DIJOYSTATE2, lARx),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
389 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
390 {&GUID_RyAxis, FIELD_OFFSET(DIJOYSTATE2, lARy),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
391 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
392 {&GUID_RzAxis, FIELD_OFFSET(DIJOYSTATE2, lARz),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
393 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
394 {&GUID_Slider, FIELD_OFFSET(DIJOYSTATE2, rglASlider[0]),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
395 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
396 {&GUID_Slider, FIELD_OFFSET(DIJOYSTATE2, rglASlider[1]),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
397 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
398 {&GUID_XAxis, FIELD_OFFSET(DIJOYSTATE2, lFX),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
399 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
400 {&GUID_YAxis, FIELD_OFFSET(DIJOYSTATE2, lFY),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
401 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
402 {&GUID_ZAxis, FIELD_OFFSET(DIJOYSTATE2, lFZ),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
403 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
404 {&GUID_RxAxis, FIELD_OFFSET(DIJOYSTATE2, lFRx),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
405 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
406 {&GUID_RyAxis, FIELD_OFFSET(DIJOYSTATE2, lFRy),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
407 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
408 {&GUID_RzAxis, FIELD_OFFSET(DIJOYSTATE2, lFRz),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
409 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
410 {&GUID_Slider, FIELD_OFFSET(DIJOYSTATE2, rglFSlider[0]),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
411 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
412 {&GUID_Slider, FIELD_OFFSET(DIJOYSTATE2, rglFSlider[1]),
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
413 DIDFT_OPTIONAL | DIDFT_AXIS | DIDFT_ANYINSTANCE, 0},
2760
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
414 };
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
415
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
416 const DIDATAFORMAT c_dfDIJoystick2 = {
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
417 sizeof(DIDATAFORMAT),
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
418 sizeof(DIOBJECTDATAFORMAT),
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
419 DIDF_ABSAXIS,
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
420 sizeof(DIJOYSTATE2),
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
421 SDL_arraysize(dfDIJoystick2),
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
422 dfDIJoystick2
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
423 };
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
424
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
425
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
426 /* Convert a DirectInput return code to a text message */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
427 static void
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
428 SetDIerror(const char *function, HRESULT code)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
429 {
2760
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
430 /*
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
431 SDL_SetError("%s() [%s]: %s", function,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
432 DXGetErrorString9A(code), DXGetErrorDescription9A(code));
2760
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
433 */
02aa80d7905f Updated Visual C++ build
Sam Lantinga <slouken@libsdl.org>
parents: 2717
diff changeset
434 SDL_SetError("%s() DirectX error %d", function, code);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
435 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
436
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
437
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
438 /* Function to scan the system for joysticks.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
439 * This function should set SDL_numjoysticks to the number of available
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
440 * joysticks. Joystick 0 should be the system default joystick.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
441 * It should return 0, or -1 on an unrecoverable fatal error.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
442 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
443 int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
444 SDL_SYS_JoystickInit(void)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
445 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
446 HRESULT result;
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
447 HINSTANCE instance;
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
448
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
449 SYS_NumJoysticks = 0;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
450
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
451 result = CoInitialize(NULL);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
452 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
453 SetDIerror("CoInitialize", result);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
454 return (-1);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
455 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
456
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
457 result = CoCreateInstance(&CLSID_DirectInput, NULL, CLSCTX_INPROC_SERVER,
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
458 &IID_IDirectInput, (LPVOID) & dinput);
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
459
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
460 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
461 SetDIerror("CoCreateInstance", result);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
462 return (-1);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
463 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
464
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
465 /* Because we used CoCreateInstance, we need to Initialize it, first. */
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
466 instance = GetModuleHandle(NULL);
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
467 if (instance == NULL) {
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
468 SDL_SetError("GetModuleHandle() failed with error code %d.",
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
469 GetLastError());
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
470 return (-1);
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
471 }
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
472 result = IDirectInput_Initialize(dinput, instance, DIRECTINPUT_VERSION);
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
473
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
474 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
475 SetDIerror("IDirectInput::Initialize", result);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
476 return (-1);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
477 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
478
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
479 /* Look for joysticks, wheels, head trackers, gamepads, etc.. */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
480 result = IDirectInput_EnumDevices(dinput,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
481 DIDEVTYPE_JOYSTICK,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
482 EnumJoysticksCallback,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
483 NULL, DIEDFL_ATTACHEDONLY);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
484
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
485 return SYS_NumJoysticks;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
486 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
487
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
488 static BOOL CALLBACK
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
489 EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
490 {
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
491 SDL_memcpy(&SYS_Joystick[SYS_NumJoysticks], pdidInstance,
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
492 sizeof(DIDEVICEINSTANCE));
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
493 SYS_NumJoysticks++;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
494
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
495 if (SYS_NumJoysticks >= MAX_JOYSTICKS)
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
496 return DIENUM_STOP;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
497
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
498 return DIENUM_CONTINUE;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
499 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
500
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
501 /* Function to get the device-dependent name of a joystick */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
502 const char *
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
503 SDL_SYS_JoystickName(int index)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
504 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
505 /***-> test for invalid index ? */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
506 return (SYS_Joystick[index].tszProductName);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
507 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
508
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
509 /* Function to open a joystick for use.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
510 The joystick to open is specified by the index field of the joystick.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
511 This should fill the nbuttons and naxes fields of the joystick structure.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
512 It returns 0, or -1 if there is an error.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
513 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
514 int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
515 SDL_SYS_JoystickOpen(SDL_Joystick * joystick)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
516 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
517 HRESULT result;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
518 LPDIRECTINPUTDEVICE device;
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
519 DIPROPDWORD dipdw;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
520
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
521 SDL_memset(&dipdw, 0, sizeof(DIPROPDWORD));
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
522 dipdw.diph.dwSize = sizeof(DIPROPDWORD);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
523 dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
524
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
525
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
526 /* allocate memory for system specific hardware data */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
527 joystick->hwdata =
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
528 (struct joystick_hwdata *) SDL_malloc(sizeof(struct joystick_hwdata));
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
529 if (joystick->hwdata == NULL) {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
530 SDL_OutOfMemory();
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
531 return (-1);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
532 }
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
533 SDL_memset(joystick->hwdata, 0, sizeof(struct joystick_hwdata));
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
534 joystick->hwdata->buffered = 1;
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
535 joystick->hwdata->Capabilities.dwSize = sizeof(DIDEVCAPS);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
536
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
537 result =
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
538 IDirectInput_CreateDevice(dinput,
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
539 &SYS_Joystick[joystick->index].guidInstance,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
540 &device, NULL);
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
541 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
542 SetDIerror("IDirectInput::CreateDevice", result);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
543 return (-1);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
544 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
545
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
546 /* Now get the IDirectInputDevice2 interface, instead. */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
547 result = IDirectInputDevice_QueryInterface(device,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
548 &IID_IDirectInputDevice2,
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
549 (LPVOID *) & joystick->hwdata->
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
550 InputDevice);
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
551 /* We are done with this object. Use the stored one from now on. */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
552 IDirectInputDevice_Release(device);
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
553
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
554 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
555 SetDIerror("IDirectInputDevice::QueryInterface", result);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
556 return (-1);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
557 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
558
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
559 /* Aquire shared access. Exclusive access is required for forces,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
560 * though. */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
561 result =
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
562 IDirectInputDevice2_SetCooperativeLevel(joystick->hwdata->InputDevice,
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
563 SDL_HelperWindow,
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
564 DISCL_EXCLUSIVE |
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
565 DISCL_BACKGROUND);
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
566 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
567 SetDIerror("IDirectInputDevice2::SetCooperativeLevel", result);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
568 return (-1);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
569 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
570
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
571 /* Use the extended data structure: DIJOYSTATE2. */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
572 result =
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
573 IDirectInputDevice2_SetDataFormat(joystick->hwdata->InputDevice,
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
574 &c_dfDIJoystick2);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
575 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
576 SetDIerror("IDirectInputDevice2::SetDataFormat", result);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
577 return (-1);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
578 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
579
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
580 /* Get device capabilities */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
581 result =
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
582 IDirectInputDevice2_GetCapabilities(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
583 &joystick->hwdata->Capabilities);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
584
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
585 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
586 SetDIerror("IDirectInputDevice2::GetCapabilities", result);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
587 return (-1);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
588 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
589
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
590 /* Force capable? */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
591 if (joystick->hwdata->Capabilities.dwFlags & DIDC_FORCEFEEDBACK) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
592
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
593 result = IDirectInputDevice2_Acquire(joystick->hwdata->InputDevice);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
594
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
595 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
596 SetDIerror("IDirectInputDevice2::Acquire", result);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
597 return (-1);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
598 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
599
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
600 /* reset all accuators. */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
601 result =
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
602 IDirectInputDevice2_SendForceFeedbackCommand(joystick->
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
603 hwdata->InputDevice,
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
604 DISFFC_RESET);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
605
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
606 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
607 SetDIerror("IDirectInputDevice2::SendForceFeedbackCommand",
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
608 result);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
609 return (-1);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
610 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
611
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
612 result = IDirectInputDevice2_Unacquire(joystick->hwdata->InputDevice);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
613
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
614 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
615 SetDIerror("IDirectInputDevice2::Unacquire", result);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
616 return (-1);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
617 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
618
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
619 /* Turn on auto-centering for a ForceFeedback device (until told
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
620 * otherwise). */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
621 dipdw.diph.dwObj = 0;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
622 dipdw.diph.dwHow = DIPH_DEVICE;
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
623 dipdw.dwData = DIPROPAUTOCENTER_ON;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
624
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
625 result =
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
626 IDirectInputDevice2_SetProperty(joystick->hwdata->InputDevice,
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
627 DIPROP_AUTOCENTER, &dipdw.diph);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
628
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
629 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
630 SetDIerror("IDirectInputDevice2::SetProperty", result);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
631 return (-1);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
632 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
633 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
634
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
635 /* What buttons and axes does it have? */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
636 IDirectInputDevice2_EnumObjects(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
637 EnumDevObjectsCallback, joystick,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
638 DIDFT_BUTTON | DIDFT_AXIS | DIDFT_POV);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
639
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
640 dipdw.diph.dwObj = 0;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
641 dipdw.diph.dwHow = DIPH_DEVICE;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
642 dipdw.dwData = INPUT_QSIZE;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
643
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
644 /* Set the buffer size */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
645 result =
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
646 IDirectInputDevice2_SetProperty(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
647 DIPROP_BUFFERSIZE, &dipdw.diph);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
648
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
649 if (result == DI_POLLEDDEVICE) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
650 /* This device doesn't support buffering, so we're forced
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
651 * to use less reliable polling. */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
652 joystick->hwdata->buffered = 0;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
653 } else if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
654 SetDIerror("IDirectInputDevice2::SetProperty", result);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
655 return (-1);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
656 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
657
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
658 return (0);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
659 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
660
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
661 static BOOL CALLBACK
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
662 EnumDevObjectsCallback(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID pvRef)
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
663 {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
664 SDL_Joystick *joystick = (SDL_Joystick *) pvRef;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
665 HRESULT result;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
666 input_t *in = &joystick->hwdata->Inputs[joystick->hwdata->NumInputs];
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
667
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
668 in->ofs = dev->dwOfs;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
669
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
670 if (dev->dwType & DIDFT_BUTTON) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
671 in->type = BUTTON;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
672 in->num = joystick->nbuttons;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
673 joystick->nbuttons++;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
674 } else if (dev->dwType & DIDFT_POV) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
675 in->type = HAT;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
676 in->num = joystick->nhats;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
677 joystick->nhats++;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
678 } else if (dev->dwType & DIDFT_AXIS) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
679 DIPROPRANGE diprg;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
680 DIPROPDWORD dilong;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
681
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
682 in->type = AXIS;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
683 in->num = joystick->naxes;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
684
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
685 diprg.diph.dwSize = sizeof(diprg);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
686 diprg.diph.dwHeaderSize = sizeof(diprg.diph);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
687 diprg.diph.dwObj = dev->dwOfs;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
688 diprg.diph.dwHow = DIPH_BYOFFSET;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
689 diprg.lMin = AXIS_MIN;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
690 diprg.lMax = AXIS_MAX;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
691
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
692 result =
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
693 IDirectInputDevice2_SetProperty(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
694 DIPROP_RANGE, &diprg.diph);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
695 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
696 return DIENUM_CONTINUE; /* don't use this axis */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
697 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
698
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
699 /* Set dead zone to 0. */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
700 dilong.diph.dwSize = sizeof(dilong);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
701 dilong.diph.dwHeaderSize = sizeof(dilong.diph);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
702 dilong.diph.dwObj = dev->dwOfs;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
703 dilong.diph.dwHow = DIPH_BYOFFSET;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
704 dilong.dwData = 0;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
705 result =
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
706 IDirectInputDevice2_SetProperty(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
707 DIPROP_DEADZONE, &dilong.diph);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
708 if (FAILED(result)) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
709 return DIENUM_CONTINUE; /* don't use this axis */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
710 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
711
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
712 joystick->naxes++;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
713 } else {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
714 /* not supported at this time */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
715 return DIENUM_CONTINUE;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
716 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
717
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
718 joystick->hwdata->NumInputs++;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
719
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
720 if (joystick->hwdata->NumInputs == MAX_INPUTS) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
721 return DIENUM_STOP; /* too many */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
722 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
723
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
724 return DIENUM_CONTINUE;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
725 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
726
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
727 /* Function to update the state of a joystick - called as a device poll.
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
728 * This function shouldn't update the joystick structure directly,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
729 * but instead should call SDL_PrivateJoystick*() to deliver events
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
730 * and update joystick device state.
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
731 */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
732 void
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
733 SDL_SYS_JoystickUpdate_Polled(SDL_Joystick * joystick)
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
734 {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
735 DIJOYSTATE2 state;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
736 HRESULT result;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
737 int i;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
738
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
739 result =
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
740 IDirectInputDevice2_GetDeviceState(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
741 sizeof(DIJOYSTATE2), &state);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
742 if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
743 IDirectInputDevice2_Acquire(joystick->hwdata->InputDevice);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
744 result =
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
745 IDirectInputDevice2_GetDeviceState(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
746 sizeof(DIJOYSTATE2), &state);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
747 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
748
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
749 /* Set each known axis, button and POV. */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
750 for (i = 0; i < joystick->hwdata->NumInputs; ++i) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
751 const input_t *in = &joystick->hwdata->Inputs[i];
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
752
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
753 switch (in->type) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
754 case AXIS:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
755 switch (in->ofs) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
756 case DIJOFS_X:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
757 SDL_PrivateJoystickAxis_Int(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
758 (Sint16) state.lX);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
759 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
760 case DIJOFS_Y:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
761 SDL_PrivateJoystickAxis_Int(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
762 (Sint16) state.lY);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
763 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
764 case DIJOFS_Z:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
765 SDL_PrivateJoystickAxis_Int(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
766 (Sint16) state.lZ);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
767 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
768 case DIJOFS_RX:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
769 SDL_PrivateJoystickAxis_Int(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
770 (Sint16) state.lRx);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
771 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
772 case DIJOFS_RY:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
773 SDL_PrivateJoystickAxis_Int(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
774 (Sint16) state.lRy);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
775 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
776 case DIJOFS_RZ:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
777 SDL_PrivateJoystickAxis_Int(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
778 (Sint16) state.lRz);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
779 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
780 case DIJOFS_SLIDER(0):
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
781 SDL_PrivateJoystickAxis_Int(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
782 (Sint16) state.rglSlider[0]);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
783 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
784 case DIJOFS_SLIDER(1):
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
785 SDL_PrivateJoystickAxis_Int(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
786 (Sint16) state.rglSlider[1]);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
787 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
788 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
789
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
790 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
791
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
792 case BUTTON:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
793 SDL_PrivateJoystickButton_Int(joystick, in->num,
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
794 (Uint8) (state.rgbButtons[in->ofs -
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
795 DIJOFS_BUTTON0]
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
796 ? SDL_PRESSED :
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
797 SDL_RELEASED));
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
798 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
799 case HAT:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
800 {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
801 Uint8 pos = TranslatePOV(state.rgdwPOV[in->ofs -
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
802 DIJOFS_POV(0)]);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
803 SDL_PrivateJoystickHat_Int(joystick, in->num, pos);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
804 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
805 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
806 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
807 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
808 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
809
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
810 void
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
811 SDL_SYS_JoystickUpdate_Buffered(SDL_Joystick * joystick)
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
812 {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
813 int i;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
814 HRESULT result;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
815 DWORD numevents;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
816 DIDEVICEOBJECTDATA evtbuf[INPUT_QSIZE];
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
817
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
818 numevents = INPUT_QSIZE;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
819 result =
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
820 IDirectInputDevice2_GetDeviceData(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
821 sizeof(DIDEVICEOBJECTDATA), evtbuf,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
822 &numevents, 0);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
823 if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
824 IDirectInputDevice2_Acquire(joystick->hwdata->InputDevice);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
825 result =
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
826 IDirectInputDevice2_GetDeviceData(joystick->hwdata->InputDevice,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
827 sizeof(DIDEVICEOBJECTDATA),
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
828 evtbuf, &numevents, 0);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
829 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
830
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
831 /* Handle the events or punt */
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
832 if (FAILED(result))
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
833 return;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
834
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
835 for (i = 0; i < (int) numevents; ++i) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
836 int j;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
837
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
838 for (j = 0; j < joystick->hwdata->NumInputs; ++j) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
839 const input_t *in = &joystick->hwdata->Inputs[j];
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
840
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
841 if (evtbuf[i].dwOfs != in->ofs)
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
842 continue;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
843
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
844 switch (in->type) {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
845 case AXIS:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
846 SDL_PrivateJoystickAxis(joystick, in->num,
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
847 (Sint16) evtbuf[i].dwData);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
848 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
849 case BUTTON:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
850 SDL_PrivateJoystickButton(joystick, in->num,
3011
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
851 (Uint8) (evtbuf[i].dwData ?
8f4ed5ec2b06 I ran a global "make indent" it modified the following files.
Bob Pendleton <bob@pendleton.com>
parents: 2859
diff changeset
852 SDL_PRESSED :
2198
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
853 SDL_RELEASED));
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
854 break;
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
855 case HAT:
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
856 {
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
857 Uint8 pos = TranslatePOV(evtbuf[i].dwData);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
858 SDL_PrivateJoystickHat(joystick, in->num, pos);
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
859 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
860 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
861 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
862 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
863 }
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
864
fe19afb86473 Split acinclude.m4 into its component parts for easy updating
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
865
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
866 static Uint8
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
867 TranslatePOV(DWORD value)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
868 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
869 const int HAT_VALS[] = {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
870 SDL_HAT_UP,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
871 SDL_HAT_UP | SDL_HAT_RIGHT,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
872 SDL_HAT_RIGHT,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
873 SDL_HAT_DOWN | SDL_HAT_RIGHT,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
874 SDL_HAT_DOWN,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
875 SDL_HAT_DOWN | SDL_HAT_LEFT,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
876 SDL_HAT_LEFT,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
877 SDL_HAT_UP | SDL_HAT_LEFT
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
878 };
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
879
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
880 if (LOWORD(value) == 0xFFFF)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
881 return SDL_HAT_CENTERED;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
882
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
883 /* Round the value up: */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
884 value += 4500 / 2;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
885 value %= 36000;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
886 value /= 4500;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
887
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
888 if (value >= 8)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
889 return SDL_HAT_CENTERED; /* shouldn't happen */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
890
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
891 return HAT_VALS[value];
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
892 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
893
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
894 /* SDL_PrivateJoystick* doesn't discard duplicate events, so we need to
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
895 * do it. */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
896 static int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
897 SDL_PrivateJoystickAxis_Int(SDL_Joystick * joystick, Uint8 axis, Sint16 value)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
898 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
899 if (joystick->axes[axis] != value)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
900 return SDL_PrivateJoystickAxis(joystick, axis, value);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
901 return 0;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
902 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
903
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
904 static int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
905 SDL_PrivateJoystickHat_Int(SDL_Joystick * joystick, Uint8 hat, Uint8 value)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
906 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
907 if (joystick->hats[hat] != value)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
908 return SDL_PrivateJoystickHat(joystick, hat, value);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
909 return 0;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
910 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
911
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
912 static int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
913 SDL_PrivateJoystickButton_Int(SDL_Joystick * joystick, Uint8 button,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
914 Uint8 state)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
915 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
916 if (joystick->buttons[button] != state)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
917 return SDL_PrivateJoystickButton(joystick, button, state);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
918 return 0;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
919 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
920
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
921 void
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
922 SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
923 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
924 HRESULT result;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
925
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
926 result = IDirectInputDevice2_Poll(joystick->hwdata->InputDevice);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
927 if (result == DIERR_INPUTLOST || result == DIERR_NOTACQUIRED) {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
928 IDirectInputDevice2_Acquire(joystick->hwdata->InputDevice);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
929 IDirectInputDevice2_Poll(joystick->hwdata->InputDevice);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
930 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
931
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
932 if (joystick->hwdata->buffered)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
933 SDL_SYS_JoystickUpdate_Buffered(joystick);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
934 else
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
935 SDL_SYS_JoystickUpdate_Polled(joystick);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
936 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
937
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
938 /* Function to close a joystick after use */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
939 void
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
940 SDL_SYS_JoystickClose(SDL_Joystick * joystick)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
941 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
942 IDirectInputDevice2_Unacquire(joystick->hwdata->InputDevice);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
943 IDirectInputDevice2_Release(joystick->hwdata->InputDevice);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
944
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
945 if (joystick->hwdata != NULL) {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
946 /* free system specific hardware data */
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2198
diff changeset
947 SDL_free(joystick->hwdata);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
948 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
949 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
950
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
951 /* Function to perform any system-specific joystick related cleanup */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
952 void
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
953 SDL_SYS_JoystickQuit(void)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
954 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
955 IDirectInput_Release(dinput);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
956 dinput = NULL;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
957 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
958
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
959 #endif /* SDL_JOYSTICK_DINPUT */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
960 /* vi: set ts=4 sw=4 expandtab: */