Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: experimental/iOSSampleApp/Shared/skia_ios.mm

Issue 373383003: ios fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove temp directory hack Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkImageEncoder.h » ('j') | src/core/SkFloatBits.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/iOSSampleApp/Shared/skia_ios.mm
diff --git a/experimental/iOSSampleApp/Shared/skia_ios.mm b/experimental/iOSSampleApp/Shared/skia_ios.mm
index 65b3e8a034cc1c1ca9c97622091811bf3096eeb5..7728974c71c20f02b599ae1d05ec3afef34e4543 100644
--- a/experimental/iOSSampleApp/Shared/skia_ios.mm
+++ b/experimental/iOSSampleApp/Shared/skia_ios.mm
@@ -1,14 +1,20 @@
#import <UIKit/UIKit.h>
#include "SkApplication.h"
-extern void save_args(int argc, char *argv[]);
+extern bool save_args(int argc, char *argv[], const char* dir);
int main(int argc, char *argv[]) {
signal(SIGPIPE, SIG_IGN);
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
application_init();
- save_args(argc, argv);
- int retVal = UIApplicationMain(argc, argv, nil, nil);
+ // Identify the documents directory
+ NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ NSString *docsDir = [dirPaths objectAtIndex:0];
+ const char *d = [docsDir UTF8String];
+ printf("docsdir == %s\n", d);
+
+ bool ranCommand = save_args(argc, argv, d);
+ int retVal = ranCommand ? 0 : UIApplicationMain(argc, argv, nil, nil);
application_term();
[pool release];
return retVal;
« no previous file with comments | « no previous file | include/core/SkImageEncoder.h » ('j') | src/core/SkFloatBits.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698