Permalink
Browse files

Remove trailing whitespaces

  • Loading branch information...
1 parent b9b1e8a commit 6da02a1fbc8cabfd5583d162c527076a7013c7e4 @kevineaves kevineaves committed Mar 18, 2016
Showing with 571 additions and 572 deletions.
  1. +7 −7 360Controller/ChatPad.cpp
  2. +9 −9 360Controller/ChatPad.h
  3. +2 −2 360Controller/ControlStruct.h
  4. +32 −32 360Controller/Controller.cpp
  5. +23 −23 360Controller/Controller.h
  6. +42 −42 360Controller/_60Controller.cpp
  7. +33 −33 360Controller/_60Controller.h
  8. +5 −5 360Controller/chatpadhid.h
  9. +6 −6 360Controller/chatpadkeys.cpp
  10. +5 −5 360Controller/chatpadkeys.h
  11. +2 −2 360Controller/xbox360hid.h
  12. +12 −12 360Daemon/360Daemon.m
  13. +5 −5 360Daemon/ControlPrefs.h
  14. +8 −8 360Daemon/ControlPrefs.m
  15. +15 −15 360Daemon/DaemonLEDs.m
  16. +1 −1 360Daemon/Images.xcassets/360Control.appiconset/Contents.json
  17. +0 −1 360Daemon/en.lproj/InfoPlist.strings
  18. +15 −15 DriverTool/DriverTool.m
  19. +51 −51 Feedback360/Feedback360.cpp
  20. +1 −1 Feedback360/Feedback360.h
  21. +2 −2 Feedback360/Feedback360Effect.cpp
  22. +1 −1 Feedback360/Feedback360Effect.h
  23. +3 −3 Feedback360/devlink.cpp
  24. +2 −2 Feedback360/devlink.h
  25. +1 −1 Install360Controller/Text/Welcome.rtf
  26. +1 −1 Install360Controller/makedmg.sh
  27. +2 −2 Pref360Control/DeviceItem.h
  28. +6 −6 Pref360Control/DeviceItem.m
  29. +5 −5 Pref360Control/DeviceLister.h
  30. +38 −38 Pref360Control/DeviceLister.m
  31. +2 −2 Pref360Control/MyAnalogStick.h
  32. +11 −11 Pref360Control/MyAnalogStick.m
  33. +1 −1 Pref360Control/MyBatteryMonitor.m
  34. +2 −2 Pref360Control/MyCentreButtons.h
  35. +3 −3 Pref360Control/MyCentreButtons.m
  36. +1 −1 Pref360Control/MyDeadZoneViewer.m
  37. +2 −2 Pref360Control/MyDigitalStick.h
  38. +5 −5 Pref360Control/MyDigitalStick.m
  39. +2 −2 Pref360Control/MyMainButtons.h
  40. +4 −4 Pref360Control/MyMainButtons.m
  41. +2 −2 Pref360Control/MyShoulderButton.h
  42. +3 −3 Pref360Control/MyShoulderButton.m
  43. +1 −1 Pref360Control/MyTrigger.m
  44. +1 −1 Pref360Control/MyWhole360Controller.m
  45. +1 −1 Pref360Control/MyWhole360ControllerMapper.h
  46. +16 −16 Pref360Control/MyWhole360ControllerMapper.m
  47. +2 −2 Pref360Control/Pref360ControlPref.h
  48. +58 −58 Pref360Control/Pref360ControlPref.m
  49. +12 −12 Pref360Control/Pref360StyleKit.m
  50. +1 −1 Pref360Control/Resources/artworks.xcassets/AboutTemplate.imageset/Contents.json
  51. +1 −1 Pref360Control/Resources/artworks.xcassets/PowerOffTemplate.imageset/Contents.json
  52. +16 −16 Wireless360Controller/Wireless360Controller.cpp
  53. +6 −6 Wireless360Controller/Wireless360Controller.h
  54. +3 −3 WirelessGamingReceiver/WirelessDevice.cpp
  55. +6 −6 WirelessGamingReceiver/WirelessDevice.h
  56. +34 −34 WirelessGamingReceiver/WirelessGamingReceiver.cpp
  57. +12 −12 WirelessGamingReceiver/WirelessGamingReceiver.h
  58. +21 −21 WirelessGamingReceiver/WirelessHIDDevice.cpp
  59. +5 −5 WirelessGamingReceiver/WirelessHIDDevice.h
  60. +2 −2 WirelessGamingReceiver/devices.h
@@ -1,21 +1,21 @@
/*
MICE Xbox 360 Controller driver for Mac OS X
Copyright (C) 2006-2013 Colin Munro
-
+
ChatPad.cpp - Implementation of the ChatPad Accessory driver
-
+
This file is part of Xbox360Controller.
-
+
Xbox360Controller is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
Xbox360Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -34,7 +34,7 @@ OSDefineMetaClassAndStructors(ChatPadKeyboardClass, IOHIDDevice)
IOReturn ChatPadKeyboardClass::newReportDescriptor(IOMemoryDescriptor **descriptor) const
{
IOBufferMemoryDescriptor *buffer;
-
+
buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, 0, sizeof(HID_ChatPad::ReportDescriptor));
if (buffer == NULL)
return kIOReturnNoResources;
@@ -106,7 +106,7 @@ OSNumber* ChatPadKeyboardClass::newProductIDNumber() const
static IOHIDDevice* GetParent(const IOService *current)
{
Xbox360Peripheral *owner;
-
+
owner = OSDynamicCast(Xbox360Peripheral, current->getProvider());
if (owner == NULL)
return NULL;
@@ -1,21 +1,21 @@
/*
MICE Xbox 360 Controller driver for Mac OS X
Copyright (C) 2006-2013 Colin Munro
-
+
ChatPad.h - Driver class for the ChatPad accessory
-
+
This file is part of Xbox360Controller.
-
+
Xbox360Controller is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
Xbox360Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -26,20 +26,20 @@
class ChatPadKeyboardClass : public IOHIDDevice
{
OSDeclareDefaultStructors(ChatPadKeyboardClass)
-
+
private:
public:
virtual bool start(IOService *provider);
// IOHidDevice methods
virtual IOReturn newReportDescriptor(IOMemoryDescriptor **descriptor) const;
-
+
virtual IOReturn setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options=0);
virtual IOReturn getReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options);
virtual IOReturn handleReport(IOMemoryDescriptor *report, IOHIDReportType reportType = kIOHIDReportTypeInput, IOOptionBits options = 0);
-
+
virtual OSString* newManufacturerString() const;
virtual OSNumber* newPrimaryUsageNumber() const;
virtual OSNumber* newPrimaryUsagePageNumber() const;
@@ -48,6 +48,6 @@ class ChatPadKeyboardClass : public IOHIDDevice
virtual OSString* newSerialNumberString() const;
virtual OSString* newTransportString() const;
virtual OSNumber* newVendorIDNumber() const;
-
+
virtual OSNumber* newLocationIDNumber() const;
};
@@ -1,9 +1,9 @@
/*
MICE Xbox 360 Controller driver for Mac OS X
Copyright (C) 2006-2013 Colin Munro
-
+
ControlStruct.h - Structures used by the device
-
+
This file is part of Xbox360Controller.
Xbox360Controller is free software; you can redistribute it and/or modify
@@ -1,21 +1,21 @@
/*
MICE Xbox 360 Controller driver for Mac OS X
Copyright (C) 2006-2013 Colin Munro
-
+
Controller.cpp - driver class for the 360 controller
-
+
This file is part of Xbox360Controller.
-
+
Xbox360Controller is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
Xbox360Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with Foobar; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,7 +36,7 @@ OSDefineMetaClassAndStructors(Xbox360ControllerClass, IOHIDDevice)
static Xbox360Peripheral* GetOwner(IOService *us)
{
IOService *prov = us->getProvider();
-
+
if (prov == NULL)
return NULL;
return OSDynamicCast(Xbox360Peripheral, prov);
@@ -45,7 +45,7 @@ static Xbox360Peripheral* GetOwner(IOService *us)
static IOUSBDevice* GetOwnerProvider(const IOService *us)
{
IOService *prov = us->getProvider(), *provprov;
-
+
if (prov == NULL)
return NULL;
provprov = prov->getProvider();
@@ -73,7 +73,7 @@ IOReturn Xbox360ControllerClass::setProperties(OSObject *properties)
IOReturn Xbox360ControllerClass::newReportDescriptor(IOMemoryDescriptor **descriptor) const
{
IOBufferMemoryDescriptor *buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task,0,sizeof(HID_360::ReportDescriptor));
-
+
if (buffer == NULL) return kIOReturnNoResources;
buffer->writeBytes(0,HID_360::ReportDescriptor,sizeof(HID_360::ReportDescriptor));
*descriptor=buffer;
@@ -84,7 +84,7 @@ IOReturn Xbox360ControllerClass::newReportDescriptor(IOMemoryDescriptor **descri
IOReturn Xbox360ControllerClass::setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options)
{
char data[2];
-
+
report->readBytes(0, data, 2);
if (GetOwner(this)->rumbleType == 1) // Don't Rumble
return kIOReturnSuccess;
@@ -93,7 +93,7 @@ IOReturn Xbox360ControllerClass::setReport(IOMemoryDescriptor *report,IOHIDRepor
if((data[1]!=report->getLength()) || (data[1]!=0x04)) return kIOReturnUnsupported;
{
XBOX360_OUT_RUMBLE rumble;
-
+
Xbox360_Prepare(rumble,outRumble);
report->readBytes(2,data,2);
rumble.big=data[0];
@@ -106,7 +106,7 @@ IOReturn Xbox360ControllerClass::setReport(IOMemoryDescriptor *report,IOHIDRepor
if((data[1]!=report->getLength())||(data[1]!=0x03)) return kIOReturnUnsupported;
{
XBOX360_OUT_LED led;
-
+
report->readBytes(2,data,1);
Xbox360_Prepare(led,outLed);
led.pattern=data[0];
@@ -152,7 +152,7 @@ OSString* Xbox360ControllerClass::getDeviceString(UInt8 index,const char *def) c
IOReturn err;
char buf[1024];
const char *string;
-
+
err = GetOwnerProvider(this)->GetStringDescriptor(index, buf, sizeof(buf));
if(err==kIOReturnSuccess) string=buf;
else {
@@ -207,7 +207,7 @@ OSNumber* Xbox360ControllerClass::newLocationIDNumber() const
IOUSBDevice *device;
OSNumber *number;
UInt32 location = 0;
-
+
device = GetOwnerProvider(this);
if (device)
{
@@ -220,12 +220,12 @@ OSNumber* Xbox360ControllerClass::newLocationIDNumber() const
// Make up an address
if ((number = OSDynamicCast(OSNumber, device->getProperty("USB Address"))))
location |= number->unsigned8BitValue() << 24;
-
+
if ((number = OSDynamicCast(OSNumber, device->getProperty("idProduct"))))
location |= number->unsigned8BitValue() << 16;
}
}
-
+
return (location != 0) ? OSNumber::withNumber(location, 32) : 0;
}
@@ -249,16 +249,16 @@ void Xbox360ControllerClass::remapButtons(void *buffer)
new_buttons |= ((report360->buttons & 8192) == 8192) << GetOwner(this)->mapping[12];
new_buttons |= ((report360->buttons & 16384) == 16384) << GetOwner(this)->mapping[13];
new_buttons |= ((report360->buttons & 32768) == 32768) << GetOwner(this)->mapping[14];
-
+
// IOLog("BUTTON PACKET - %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", GetOwner(this)->mapping[0], GetOwner(this)->mapping[1], GetOwner(this)->mapping[2], GetOwner(this)->mapping[3], GetOwner(this)->mapping[4], GetOwner(this)->mapping[5], GetOwner(this)->mapping[6], GetOwner(this)->mapping[7], GetOwner(this)->mapping[8], GetOwner(this)->mapping[9], GetOwner(this)->mapping[10], GetOwner(this)->mapping[11], GetOwner(this)->mapping[12], GetOwner(this)->mapping[13], GetOwner(this)->mapping[14]);
-
+
report360->buttons = new_buttons;
}
void Xbox360ControllerClass::remapAxes(void *buffer)
{
XBOX360_IN_REPORT *report360 = (XBOX360_IN_REPORT*)buffer;
-
+
XBOX360_HAT temp = report360->left;
report360->left = report360->right;
report360->right = temp;
@@ -373,7 +373,7 @@ IOReturn XboxOriginalControllerClass::handleReport(IOMemoryDescriptor * descript
IOLog("%s %d \n", __FUNCTION__, (int)reportType);
logData(data, (int)descriptor->getLength());
}
-
+
} else {
descriptor->readBytes(0, data, descriptor->getLength());
if (reportType != 0 && data[0] != 0) {
@@ -382,7 +382,7 @@ IOReturn XboxOriginalControllerClass::handleReport(IOMemoryDescriptor * descript
logData(data, (int)descriptor->getLength());
}
}
-
+
IOReturn ret = Xbox360ControllerClass::handleReport(descriptor, reportType, options);
//IOLog("%s END\n", __FUNCTION__);
return ret;
@@ -391,7 +391,7 @@ IOReturn XboxOriginalControllerClass::handleReport(IOMemoryDescriptor * descript
IOReturn XboxOriginalControllerClass::setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options)
{
char data[2];
-
+
report->readBytes(0, data, 2);
if (GetOwner(this)->rumbleType == 1) // Don't Rumble
return kIOReturnSuccess;
@@ -412,7 +412,7 @@ IOReturn XboxOriginalControllerClass::setReport(IOMemoryDescriptor *report,IOHID
if((data[1]!=report->getLength())||(data[1]!=0x03)) return kIOReturnUnsupported;
// No leds
return kIOReturnSuccess;
-
+
default:
IOLog("Unknown escape %d\n", data[0]);
return kIOReturnUnsupported;
@@ -515,7 +515,7 @@ OSString* XboxOneControllerClass::newProductString() const
UInt16 XboxOneControllerClass::convertButtonPacket(UInt16 buttons)
{
UInt16 new_buttons = 0;
-
+
new_buttons |= ((buttons & 4) == 4) << 4;
new_buttons |= ((buttons & 8) == 8) << 5;
new_buttons |= ((buttons & 16) == 16) << 12;
@@ -530,9 +530,9 @@ UInt16 XboxOneControllerClass::convertButtonPacket(UInt16 buttons)
new_buttons |= ((buttons & 8192) == 8192) << 9;
new_buttons |= ((buttons & 16384) == 16384) << 6;
new_buttons |= ((buttons & 32768) == 32768) << 7;
-
+
new_buttons |= (isXboxOneGuideButtonPressed) << 10;
-
+
return new_buttons;
}
@@ -542,10 +542,10 @@ void XboxOneControllerClass::convertFromXboxOne(void *buffer, UInt8 packetSize)
XBOX360_IN_REPORT *report360 = (XBOX360_IN_REPORT*)buffer;
UInt8 trigL = 0, trigR = 0;
XBOX360_HAT left, right;
-
+
report360->header.command = 0x00;
report360->header.size = 0x14;
-
+
if (packetSize == 0x1a) // Fight Stick
{
if ((0x80 & reportXone->true_trigR) == 0x80) { trigL = 255; }
@@ -558,7 +558,7 @@ void XboxOneControllerClass::convertFromXboxOne(void *buffer, UInt8 packetSize)
}
left = reportXone->left;
right = reportXone->right;
-
+
report360->buttons = convertButtonPacket(reportXone->buttons);
report360->trigL = trigL;
report360->trigR = trigR;
@@ -589,10 +589,10 @@ IOReturn XboxOneControllerClass::handleReport(IOMemoryDescriptor * descriptor, I
if (!(GetOwner(this)->noMapping))
remapButtons(report360);
GetOwner(this)->fiddleReport(report360->left, report360->right);
-
+
if (GetOwner(this)->swapSticks)
remapAxes(report360);
-
+
memcpy(lastData, report360, sizeof(XBOX360_IN_REPORT));
}
}
@@ -650,7 +650,7 @@ IOReturn XboxOneControllerClass::setReport(IOMemoryDescriptor *report,IOHIDRepor
rumble.little = data[2];
rumble.big = data[3];
}
-
+
GetOwner(this)->QueueWrite(&rumble,13);
return kIOReturnSuccess;
case 0x01: // Unsupported LED
@@ -684,4 +684,4 @@ OSNumber* XboxOnePretend360Class::newProductIDNumber() const
OSNumber* XboxOnePretend360Class::newVendorIDNumber() const
{
return OSNumber::withNumber(1118,16);
-}
+}
Oops, something went wrong.

0 comments on commit 6da02a1

Please sign in to comment.