diff --git a/UIDevice-hardware.h b/UIDevice-hardware.h index 08944eb..a4fba57 100644 --- a/UIDevice-hardware.h +++ b/UIDevice-hardware.h @@ -23,7 +23,8 @@ enum { UIDeviceBuiltInCamera = 1 << 2, UIDeviceBuiltInMicrophone = 1 << 3, UIDeviceSupportsExternalMicrophone = 1 << 4, - UIDeviceSupportsTelephony = 1 << 5 + UIDeviceSupportsTelephony = 1 << 5, + UIDeviceSupportsVibration = 1 << 6 }; @interface UIDevice (Hardware) diff --git a/UIDevice-hardware.m b/UIDevice-hardware.m index b313979..1307ca5 100644 --- a/UIDevice-hardware.m +++ b/UIDevice-hardware.m @@ -1,4 +1,8 @@ -/* Thanks to Emanuele Vulcano, Kevin Ballard/Eridius */ +/* Thanks to Emanuele Vulcano, Kevin Ballard/Eridius, Ryandjohnson */ + +/* + - Bluetooth? Screen pixels? Dot pitch? Accelerometer? GPS disabled in Egypt (and others?). - @halm +*/ #import "UIDevice-hardware.h" #include @@ -57,9 +61,9 @@ - (int) platformCapabilities { switch ([self platformType]) { - case UIDevice1GiPhone: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony; - case UIDevice3GiPhone: return UIDeviceSupportsGPS | UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony; - case UIDeviceUnknowniPhone: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony; + case UIDevice1GiPhone: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony | UIDeviceSupportsVibration; + case UIDevice3GiPhone: return UIDeviceSupportsGPS | UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony | UIDeviceSupportsVibration; + case UIDeviceUnknowniPhone: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony | UIDeviceSupportsVibration; case UIDevice1GiPod: return 0; case UIDevice2GiPod: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone;