Corrected spelling in C source files.
This commit is contained in:
parent
5b428b875f
commit
e83262a725
7 changed files with 17 additions and 17 deletions
|
@ -170,7 +170,7 @@ int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
|
||||||
}
|
}
|
||||||
SDL_PrivateGameControllerAxis( controllerlist, axis, value );
|
SDL_PrivateGameControllerAxis( controllerlist, axis, value );
|
||||||
}
|
}
|
||||||
else if ( controllerlist->mapping.raxesasbutton[event->jaxis.axis] >= 0 ) // simlate an axis as a button
|
else if ( controllerlist->mapping.raxesasbutton[event->jaxis.axis] >= 0 ) // simulate an axis as a button
|
||||||
{
|
{
|
||||||
SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.raxesasbutton[event->jaxis.axis], ABS(event->jaxis.value) > 32768/2 ? SDL_PRESSED : SDL_RELEASED );
|
SDL_PrivateGameControllerButton( controllerlist, controllerlist->mapping.raxesasbutton[event->jaxis.axis], ABS(event->jaxis.value) > 32768/2 ? SDL_PRESSED : SDL_RELEASED );
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@ ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID *gu
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper function to determine pre-caclulated offset to certain joystick mappings
|
* Helper function to determine pre-calculated offset to certain joystick mappings
|
||||||
*/
|
*/
|
||||||
ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index)
|
ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index)
|
||||||
{
|
{
|
||||||
|
@ -1044,7 +1044,7 @@ SDL_Joystick *SDL_GameControllerGetJoystick(SDL_GameController * gamecontroller)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the sdl joystick layer binding for this controller axi mapping
|
* Get the SDL joystick layer binding for this controller axis mapping
|
||||||
*/
|
*/
|
||||||
SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController * gamecontroller, SDL_GameControllerAxis axis)
|
SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController * gamecontroller, SDL_GameControllerAxis axis)
|
||||||
{
|
{
|
||||||
|
@ -1070,7 +1070,7 @@ SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the sdl joystick layer binding for this controller button mapping
|
* Get the SDL joystick layer binding for this controller button mapping
|
||||||
*/
|
*/
|
||||||
SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameController * gamecontroller, SDL_GameControllerButton button)
|
SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameController * gamecontroller, SDL_GameControllerButton button)
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,7 +145,7 @@ void JoystickDeviceWasRemovedCallback( void * refcon, io_service_t service, natu
|
||||||
|
|
||||||
|
|
||||||
/* Create and open an interface to device, required prior to extracting values or building queues.
|
/* Create and open an interface to device, required prior to extracting values or building queues.
|
||||||
* Note: appliction now owns the device and must close and release it prior to exiting
|
* Note: application now owns the device and must close and release it prior to exiting
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static IOReturn
|
static IOReturn
|
||||||
|
@ -218,7 +218,7 @@ HIDCreateOpenDeviceInterface(io_object_t hidDevice, recDevice * pDevice)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Closes and releases interface to device, should be done prior to exting application
|
/* Closes and releases interface to device, should be done prior to exiting application
|
||||||
* Note: will have no affect if device or interface do not exist
|
* Note: will have no affect if device or interface do not exist
|
||||||
* application will "own" the device if interface is not closed
|
* application will "own" the device if interface is not closed
|
||||||
* (device may have to be plug and re-plugged in different location to get it working again without a restart)
|
* (device may have to be plug and re-plugged in different location to get it working again without a restart)
|
||||||
|
@ -301,7 +301,7 @@ HIDGetElementInfo(CFTypeRef refElement, recElement * pElement)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* examines CF dictionary vlaue in device element hierarchy to determine if it is element of interest or a collection of more elements
|
/* examines CF dictionary value in device element hierarchy to determine if it is element of interest or a collection of more elements
|
||||||
* if element of interest allocate storage, add to list and retrieve element specific info
|
* if element of interest allocate storage, add to list and retrieve element specific info
|
||||||
* if collection then pass on to deconstruction collection into additional individual elements
|
* if collection then pass on to deconstruction collection into additional individual elements
|
||||||
*/
|
*/
|
||||||
|
@ -399,7 +399,7 @@ HIDAddElement(CFTypeRef refElement, recDevice * pDevice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* collects information from each array member in device element list (each array memeber = element) */
|
/* collects information from each array member in device element list (each array member = element) */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
HIDGetElementsCFArrayHandler(const void *value, void *parameter)
|
HIDGetElementsCFArrayHandler(const void *value, void *parameter)
|
||||||
|
@ -464,7 +464,7 @@ HIDGetDeviceInfo(io_object_t hidDevice, CFMutableDictionaryRef hidProperties,
|
||||||
io_registry_entry_t parent1, parent2;
|
io_registry_entry_t parent1, parent2;
|
||||||
|
|
||||||
/* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also
|
/* Mac OS X currently is not mirroring all USB properties to HID page so need to look at USB device page also
|
||||||
* get dictionary for usb properties: step up two levels and get CF dictionary for USB properties
|
* get dictionary for USB properties: step up two levels and get CF dictionary for USB properties
|
||||||
*/
|
*/
|
||||||
if ((KERN_SUCCESS == IORegistryEntryGetParentEntry(hidDevice, kIOServicePlane, &parent1))
|
if ((KERN_SUCCESS == IORegistryEntryGetParentEntry(hidDevice, kIOServicePlane, &parent1))
|
||||||
&& (KERN_SUCCESS == IORegistryEntryGetParentEntry(parent1, kIOServicePlane, &parent2))
|
&& (KERN_SUCCESS == IORegistryEntryGetParentEntry(parent1, kIOServicePlane, &parent2))
|
||||||
|
|
|
@ -938,7 +938,7 @@ HandleInputEvents(SDL_Joystick * joystick)
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case SYN_DROPPED :
|
case SYN_DROPPED :
|
||||||
#ifdef DEBUG_INPUT_EVENTS
|
#ifdef DEBUG_INPUT_EVENTS
|
||||||
printf("Event SYN_DROPPED dectected\n");
|
printf("Event SYN_DROPPED detected\n");
|
||||||
#endif
|
#endif
|
||||||
PollAllValues(joystick);
|
PollAllValues(joystick);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -31,12 +31,12 @@ struct joystick_hwdata
|
||||||
SDL_JoystickGUID guid;
|
SDL_JoystickGUID guid;
|
||||||
char *fname; /* Used in haptic subsystem */
|
char *fname; /* Used in haptic subsystem */
|
||||||
|
|
||||||
/* The current linux joystick driver maps hats to two axes */
|
/* The current Linux joystick driver maps hats to two axes */
|
||||||
struct hwdata_hat
|
struct hwdata_hat
|
||||||
{
|
{
|
||||||
int axis[2];
|
int axis[2];
|
||||||
} *hats;
|
} *hats;
|
||||||
/* The current linux joystick driver maps balls to two axes */
|
/* The current Linux joystick driver maps balls to two axes */
|
||||||
struct hwdata_ball
|
struct hwdata_ball
|
||||||
{
|
{
|
||||||
int axis[2];
|
int axis[2];
|
||||||
|
|
|
@ -99,7 +99,7 @@ WIN_LoadXInputDLL(void)
|
||||||
s_pXInputDLL = LoadLibrary( L"XInput1_4.dll" ); // 1.4 Ships with Windows 8.
|
s_pXInputDLL = LoadLibrary( L"XInput1_4.dll" ); // 1.4 Ships with Windows 8.
|
||||||
if (!s_pXInputDLL) {
|
if (!s_pXInputDLL) {
|
||||||
version = (1 << 16) | 3;
|
version = (1 << 16) | 3;
|
||||||
s_pXInputDLL = LoadLibrary( L"XInput1_3.dll" ); // 1.3 Ships with Vista and Win7, can be installed as a restributable component.
|
s_pXInputDLL = LoadLibrary( L"XInput1_3.dll" ); // 1.3 Ships with Vista and Win7, can be installed as a redistributable component.
|
||||||
}
|
}
|
||||||
if (!s_pXInputDLL) {
|
if (!s_pXInputDLL) {
|
||||||
s_pXInputDLL = LoadLibrary( L"bin\\XInput1_3.dll" );
|
s_pXInputDLL = LoadLibrary( L"bin\\XInput1_3.dll" );
|
||||||
|
@ -514,7 +514,7 @@ LCleanup:
|
||||||
|
|
||||||
static SDL_bool s_bWindowsDeviceChanged = SDL_FALSE;
|
static SDL_bool s_bWindowsDeviceChanged = SDL_FALSE;
|
||||||
|
|
||||||
/* windowproc for our joystick detect thread message only window, to detect any usb device addition/removal
|
/* windowproc for our joystick detect thread message only window, to detect any USB device addition/removal
|
||||||
*/
|
*/
|
||||||
LRESULT CALLBACK SDL_PrivateJoystickDetectProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
LRESULT CALLBACK SDL_PrivateJoystickDetectProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
||||||
switch (message) {
|
switch (message) {
|
||||||
|
@ -1043,7 +1043,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick, int device_index)
|
||||||
return SetDIerror("IDirectInputDevice8::QueryInterface", result);
|
return SetDIerror("IDirectInputDevice8::QueryInterface", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Aquire shared access. Exclusive access is required for forces,
|
/* Acquire shared access. Exclusive access is required for forces,
|
||||||
* though. */
|
* though. */
|
||||||
result =
|
result =
|
||||||
IDirectInputDevice8_SetCooperativeLevel(joystick->hwdata->
|
IDirectInputDevice8_SetCooperativeLevel(joystick->hwdata->
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
#include "../../core/windows/SDL_windows.h"
|
#include "../../core/windows/SDL_windows.h"
|
||||||
|
|
||||||
#define DIRECTINPUT_VERSION 0x0800 /* Need version 7 for force feedback. Need verison 8 so IDirectInput8_EnumDevices doesn't leak like a sieve... */
|
#define DIRECTINPUT_VERSION 0x0800 /* Need version 7 for force feedback. Need version 8 so IDirectInput8_EnumDevices doesn't leak like a sieve... */
|
||||||
#include <dinput.h>
|
#include <dinput.h>
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#include <wbemcli.h>
|
#include <wbemcli.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue