iOS Share PPSSPP

This commit is contained in:
Florin9doi committed 2020-04-25 10:07:46 +03:00
1 parent b5a0af635f
commit 1ccde0427e
4 files changed
+13 -1

No files matched your search

+1 -1
View File
@@ -535,7 +535,7 @@ void CreditsScreen::CreateViews() {
root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg);
root_->Add(new Button(cr->T("Privacy Policy"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnPrivacy);
root_->Add(new Button(cr->T("Twitter @PPSSPP_emu"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, rightYOffset + 84, false)))->OnClick.Handle(this, &CreditsScreen::OnTwitter);
#if PPSSPP_PLATFORM(ANDROID)
#if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(IOS)
root_->Add(new Button(cr->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, rightYOffset + 158, false)))->OnClick.Handle(this, &CreditsScreen::OnShare);
#endif
if (System_GetPropertyBool(SYSPROP_APP_GOLD)) {
+1
View File
@@ -12,6 +12,7 @@
@interface ViewController : GLKViewController <iCadeEventDelegate,
LocationHandlerDelegate, CameraFrameDelegate>
- (void)shareText:(NSString *)text;
- (void)shutdown;
@end
+8
View File
@@ -148,6 +148,14 @@ static LocationHelper *locationHelper;
- (void)subtleVolume:(SubtleVolume *)volumeView didChange:(CGFloat)value {
}
- (void)shareText:(NSString *)text {
NSArray *items = @[text];
UIActivityViewController * viewController = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil];
dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:viewController animated:YES completion:nil];
});
}
- (void)viewSafeAreaInsetsDidChange {
if (@available(iOS 11.0, *)) {
[super viewSafeAreaInsetsDidChange];
+3
View File
@@ -114,6 +114,9 @@ void System_SendMessage(const char *command, const char *parameter) {
// [sharedViewController shutdown];
// exit(0);
// });
} else if (!strcmp(command, "sharetext")) {
NSString *text = [NSString stringWithUTF8String:parameter];
[sharedViewController shareText:text];
} else if (!strcmp(command, "camera_command")) {
if (!strncmp(parameter, "startVideo", 10)) {
int width = 0, height = 0;