File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
src/src/org/renpy/android Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,21 @@ public void waitForResume() {
395395 }
396396 }
397397 }
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+ }
398413 }
399414
400415 /**
@@ -437,7 +452,6 @@ public void onResume() {
437452 this .notifyAll ();
438453 }
439454 }
440-
441455 wakeLock .acquire ();
442456 }
443457
@@ -596,8 +610,9 @@ public void run() {
596610 return ;
597611 }
598612
599- Log .w (TAG , "Done" );
600- waitForStart ();
613+ Log .w (TAG , "Done" );
614+ waitForStart ();
615+ setOpenFile ();
601616
602617 nativeResize (mWidth , mHeight );
603618 nativeInitJavaCallbacks ();
You can’t perform that action at this time.
0 commit comments