mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Improved PPSSPP’s Vibrate() for iOS, now no longer gives you a hand massage.
This commit is contained in:
parent
b3b83b33cb
commit
ab44947e00
1 changed files with 11 additions and 2 deletions
13
ios/main.mm
13
ios/main.mm
|
@ -27,9 +27,18 @@ void System_SendMessage(const char *command, const char *parameter) {
|
|||
}
|
||||
}
|
||||
|
||||
FOUNDATION_EXTERN void AudioServicesPlaySystemSoundWithVibration(unsigned long, objc_object*, NSDictionary*);
|
||||
|
||||
void Vibrate(int length_ms) {
|
||||
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
|
||||
// TODO: Actually make use of length_ms?
|
||||
|
||||
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
|
||||
NSArray *pattern = @[@YES, @30, @NO, @2];
|
||||
|
||||
dictionary[@"VibePattern"] = pattern;
|
||||
dictionary[@"Intensity"] = @2;
|
||||
|
||||
AudioServicesPlaySystemSoundWithVibration(kSystemSoundID_Vibrate, nil, dictionary);
|
||||
// TODO: Actually make use of length_ms if PPSSPP ever adds that in the config
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
|
Loading…
Add table
Reference in a new issue