Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added Vibration support flag

  • Loading branch information...
commit f651a1cf349e66a15b34a061550b3ab251a99eed 1 parent 8b076c6
authored March 05, 2009
3  UIDevice-hardware.h
@@ -23,7 +23,8 @@ enum {
23 23
 	UIDeviceBuiltInCamera = 1 << 2,
24 24
 	UIDeviceBuiltInMicrophone = 1 << 3,
25 25
 	UIDeviceSupportsExternalMicrophone = 1 << 4,
26  
-	UIDeviceSupportsTelephony = 1 << 5
  26
+	UIDeviceSupportsTelephony = 1 << 5,
  27
+	UIDeviceSupportsVibration = 1 << 6
27 28
 };
28 29
 
29 30
 @interface UIDevice (Hardware)
12  UIDevice-hardware.m
... ...
@@ -1,4 +1,8 @@
1  
-/* Thanks to Emanuele Vulcano, Kevin Ballard/Eridius */
  1
+/* Thanks to Emanuele Vulcano, Kevin Ballard/Eridius, Ryandjohnson */
  2
+
  3
+/*
  4
+ - Bluetooth? Screen pixels? Dot pitch? Accelerometer? GPS disabled in Egypt (and others?). - @halm
  5
+*/
2 6
 
3 7
 #import "UIDevice-hardware.h"
4 8
 #include <sys/types.h>
@@ -57,9 +61,9 @@ - (int) platformCapabilities
57 61
 {
58 62
 	switch ([self platformType])
59 63
 	{
60  
-		case UIDevice1GiPhone: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony;
61  
-		case UIDevice3GiPhone: return UIDeviceSupportsGPS | UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony;
62  
-		case UIDeviceUnknowniPhone: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony;
  64
+		case UIDevice1GiPhone: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony | UIDeviceSupportsVibration;
  65
+		case UIDevice3GiPhone: return UIDeviceSupportsGPS | UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony | UIDeviceSupportsVibration;
  66
+		case UIDeviceUnknowniPhone: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInCamera | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone | UIDeviceSupportsTelephony | UIDeviceSupportsVibration;
63 67
 
64 68
 		case UIDevice1GiPod: return 0;
65 69
 		case UIDevice2GiPod: return UIDeviceBuiltInSpeaker | UIDeviceBuiltInMicrophone | UIDeviceSupportsExternalMicrophone;

0 notes on commit f651a1c

Please sign in to comment.
Something went wrong with that request. Please try again.