Revisão | 29277ec0b3db9723a21ea4721fbddf8673c871d3 (tree) |
---|---|
Hora | 2020-02-26 01:39:17 |
Autor | David Ludwig <dludwig@pobo...> |
Commiter | David Ludwig |
vjoy-API verb renaming: 'Create' to 'Attach', 'Destroy' to 'Detach'
@@ -201,10 +201,10 @@ | ||
201 | 201 | extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index); |
202 | 202 | |
203 | 203 | /** |
204 | - * Creates and registers a new virtual joystick. | |
204 | + * Attaches a new virtual joystick. | |
205 | 205 | * Returns the joystick's device index, or -1 if an error occurred. |
206 | 206 | */ |
207 | -extern DECLSPEC int SDLCALL SDL_JoystickCreateVirtual(SDL_JoystickType type, | |
207 | +extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, | |
208 | 208 | const char *name, |
209 | 209 | int naxes, |
210 | 210 | int nballs, |
@@ -212,10 +212,10 @@ | ||
212 | 212 | int nhats); |
213 | 213 | |
214 | 214 | /** |
215 | - * Removes and deletes memory associated with a virtual joystick | |
215 | + * Detaches a virtual joystick | |
216 | 216 | * Returns 0 on success, or -1 if an error occurred. |
217 | 217 | */ |
218 | -extern DECLSPEC int SDLCALL SDL_JoystickDestroyVirtual(int device_index); | |
218 | +extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index); | |
219 | 219 | |
220 | 220 | /** |
221 | 221 | * Indicates whether or not a virtual-joystick is at a given device index. |
@@ -746,8 +746,8 @@ | ||
746 | 746 | #define SDL_OnApplicationWillEnterForeground SDL_OnApplicationWillEnterForeground_REAL |
747 | 747 | #define SDL_OnApplicationDidBecomeActive SDL_OnApplicationDidBecomeActive_REAL |
748 | 748 | #define SDL_OnApplicationDidChangeStatusBarOrientation SDL_OnApplicationDidChangeStatusBarOrientation_REAL |
749 | -#define SDL_JoystickCreateVirtual SDL_JoystickCreateVirtual_REAL | |
750 | -#define SDL_JoystickDestroyVirtual SDL_JoystickDestroyVirtual_REAL | |
749 | +#define SDL_JoystickAttachVirtual SDL_JoystickAttachVirtual_REAL | |
750 | +#define SDL_JoystickDetachVirtual SDL_JoystickDetachVirtual_REAL | |
751 | 751 | #define SDL_JoystickIsVirtual SDL_JoystickIsVirtual_REAL |
752 | 752 | #define SDL_JoystickSetVirtualAxis SDL_JoystickSetVirtualAxis_REAL |
753 | 753 | #define SDL_JoystickSetVirtualBall SDL_JoystickSetVirtualBall_REAL |
@@ -804,8 +804,8 @@ | ||
804 | 804 | #ifdef __IPHONEOS__ |
805 | 805 | SDL_DYNAPI_PROC(void,SDL_OnApplicationDidChangeStatusBarOrientation,(void),(),) |
806 | 806 | #endif |
807 | -SDL_DYNAPI_PROC(int,SDL_JoystickCreateVirtual,(SDL_JoystickType a, const char *b, int c, int d, int e, int f),(a,b,c,d,e,f),return) | |
808 | -SDL_DYNAPI_PROC(int,SDL_JoystickDestroyVirtual,(int a),(a),return) | |
807 | +SDL_DYNAPI_PROC(int,SDL_JoystickAttachVirtual,(SDL_JoystickType a, const char *b, int c, int d, int e, int f),(a,b,c,d,e,f),return) | |
808 | +SDL_DYNAPI_PROC(int,SDL_JoystickDetachVirtual,(int a),(a),return) | |
809 | 809 | SDL_DYNAPI_PROC(SDL_bool,SDL_JoystickIsVirtual,(int a),(a),return) |
810 | 810 | SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualAxis,(SDL_Joystick *a, int b, Sint16 c),(a,b,c),return) |
811 | 811 | SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualBall,(SDL_Joystick *a, int b, Sint16 c, Sint16 d),(a,b,c,d),return) |
@@ -471,7 +471,7 @@ | ||
471 | 471 | |
472 | 472 | |
473 | 473 | int |
474 | -SDL_JoystickCreateVirtual(SDL_JoystickType type, | |
474 | +SDL_JoystickAttachVirtual(SDL_JoystickType type, | |
475 | 475 | const char *name, |
476 | 476 | int naxes, |
477 | 477 | int nballs, |
@@ -479,7 +479,7 @@ | ||
479 | 479 | int nhats) |
480 | 480 | { |
481 | 481 | #if SDL_JOYSTICK_VIRTUAL |
482 | - return SDL_JoystickCreateVirtualInner(type, | |
482 | + return SDL_JoystickAttachVirtualInner(type, | |
483 | 483 | name, |
484 | 484 | naxes, |
485 | 485 | nballs, |
@@ -492,10 +492,10 @@ | ||
492 | 492 | |
493 | 493 | |
494 | 494 | int |
495 | -SDL_JoystickDestroyVirtual(int device_index) | |
495 | +SDL_JoystickDetachVirtual(int device_index) | |
496 | 496 | { |
497 | 497 | #if SDL_JOYSTICK_VIRTUAL |
498 | - return SDL_JoystickDestroyVirtualInner(device_index); | |
498 | + return SDL_JoystickDetachVirtualInner(device_index); | |
499 | 499 | #else |
500 | 500 | return SDL_SetError("SDL not built with virtual-joystick support"); |
501 | 501 | #endif |
@@ -98,7 +98,7 @@ | ||
98 | 98 | |
99 | 99 | |
100 | 100 | int |
101 | -SDL_JoystickCreateVirtualInner(SDL_JoystickType type, | |
101 | +SDL_JoystickAttachVirtualInner(SDL_JoystickType type, | |
102 | 102 | const char *name, |
103 | 103 | int naxes, |
104 | 104 | int nballs, |
@@ -172,7 +172,7 @@ | ||
172 | 172 | |
173 | 173 | |
174 | 174 | int |
175 | -SDL_JoystickDestroyVirtualInner(int device_index) | |
175 | +SDL_JoystickDetachVirtualInner(int device_index) | |
176 | 176 | { |
177 | 177 | printf("IMPLEMENT ME!!!: %s\n", __FUNCTION__); |
178 | 178 | return SDL_Unsupported(); |
@@ -57,14 +57,14 @@ | ||
57 | 57 | struct joystick_hwdata *next; |
58 | 58 | } joystick_hwdata; |
59 | 59 | |
60 | -int SDL_JoystickCreateVirtualInner(SDL_JoystickType type, | |
60 | +int SDL_JoystickAttachVirtualInner(SDL_JoystickType type, | |
61 | 61 | const char *name, |
62 | 62 | int naxes, |
63 | 63 | int nballs, |
64 | 64 | int nbuttons, |
65 | 65 | int nhats); |
66 | 66 | |
67 | -int SDL_JoystickDestroyVirtualInner(int device_index); | |
67 | +int SDL_JoystickDetachVirtualInner(int device_index); | |
68 | 68 | |
69 | 69 | int SDL_JoystickSetVirtualAxisInner(SDL_Joystick * joystick, int axis, Sint16 value); |
70 | 70 | int SDL_JoystickSetVirtualBallInner(SDL_Joystick * joystick, int ball, Sint16 xrel, Sint16 yrel); |