File tree 1 file changed +18
-3
lines changed
src/src/org/renpy/android
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,21 @@ public void waitForResume() {
395
395
}
396
396
}
397
397
}
398
+ setOpenFile ();
399
+ }
400
+
401
+ /**
402
+ * if the activity was called with a file parameter, put it in the
403
+ * 'PYTHON_OPENFILE' env var
404
+ */
405
+ public static void setOpenFile (){
406
+ final android .content .Intent intent = mActivity .getIntent ();
407
+ if (intent != null ) {
408
+ final android .net .Uri data = intent .getData ();
409
+ if (data != null ){
410
+ nativeSetEnv ("PYTHON_OPENFILE" , data .getEncodedPath ());
411
+ }
412
+ }
398
413
}
399
414
400
415
/**
@@ -437,7 +452,6 @@ public void onResume() {
437
452
this .notifyAll ();
438
453
}
439
454
}
440
-
441
455
wakeLock .acquire ();
442
456
}
443
457
@@ -596,8 +610,9 @@ public void run() {
596
610
return ;
597
611
}
598
612
599
- Log .w (TAG , "Done" );
600
- waitForStart ();
613
+ Log .w (TAG , "Done" );
614
+ waitForStart ();
615
+ setOpenFile ();
601
616
602
617
nativeResize (mWidth , mHeight );
603
618
nativeInitJavaCallbacks ();
You can’t perform that action at this time.
0 commit comments