diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-02 10:36:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-02 10:36:30 +0200 |
| commit | d2c416ec62e65fd42ff1bbf493cf06689e4d1b60 (patch) | |
| tree | 99a7b15bf35ad43c33dc9fd583cde4fd8f6e9dff /platform/android/java/src/org/godotengine/godot/Godot.java | |
| parent | e8b483ce21e1c8b1d79ca1693273d03b19b38388 (diff) | |
| parent | 12e0dc1b65d3e69206ce64daa461b269c638b944 (diff) | |
| download | redot-engine-d2c416ec62e65fd42ff1bbf493cf06689e4d1b60.tar.gz | |
Merge pull request #29824 from m4gr3d/add_ovr_export
Add XR mode selection to the Android export process.
Diffstat (limited to 'platform/android/java/src/org/godotengine/godot/Godot.java')
| -rw-r--r-- | platform/android/java/src/org/godotengine/godot/Godot.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java index 751e885118..6e1841fa8b 100644 --- a/platform/android/java/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/src/org/godotengine/godot/Godot.java @@ -58,7 +58,6 @@ import android.os.Environment; import android.os.Messenger; import android.provider.Settings.Secure; import android.support.v4.content.ContextCompat; -import android.util.Log; import android.view.Display; import android.view.KeyEvent; import android.view.MotionEvent; @@ -115,6 +114,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC private Button mPauseButton; private Button mWiFiSettingsButton; + private XRMode xrMode = XRMode.REGULAR; private boolean use_32_bits = false; private boolean use_immersive = false; private boolean use_debug_opengl = false; @@ -282,7 +282,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC // ...add to FrameLayout layout.addView(edittext); - mView = new GodotView(this, XRMode.PANCAKE, use_gl3, use_32_bits, use_debug_opengl); + mView = new GodotView(this, xrMode, use_gl3, use_32_bits, use_debug_opengl); layout.addView(mView, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); edittext.setView(mView); io.setEdit(edittext); @@ -488,7 +488,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC for (int i = 0; i < command_line.length; i++) { boolean has_extra = i < command_line.length - 1; - if (command_line[i].equals("--use_depth_32")) { + if (command_line[i].equals(XRMode.REGULAR.cmdLineArg)) { + xrMode = XRMode.REGULAR; + } else if (command_line[i].equals(XRMode.OVR.cmdLineArg)) { + xrMode = XRMode.OVR; + } else if (command_line[i].equals("--use_depth_32")) { use_32_bits = true; } else if (command_line[i].equals("--debug_opengl")) { use_debug_opengl = true; |
