SDL: setenv("CARDBOARD_VR") if started from Google Cardboard app

This commit is contained in:
pelya
2015-12-14 01:07:02 +02:00
parent 12e9683685
commit abaf57d615
7 changed files with 11 additions and 5 deletions

View File

@@ -638,6 +638,11 @@ class Settings
nativeSetEnv( "TV", "1" );
nativeSetEnv( "ANDROID_TV", "1" );
}
if (p.getIntent().getCategories() != null && p.getIntent().getCategories().contains("com.google.intent.category.CARDBOARD")) {
nativeSetEnv( "CARDBOARD", "1" );
nativeSetEnv( "VR", "1" );
nativeSetEnv( "CARDBOARD_VR", "1" );
}
if (p.getIntent().getStringExtra(RestartMainActivity.SDL_RESTART_PARAMS) != null)
nativeSetEnv( RestartMainActivity.SDL_RESTART_PARAMS, p.getIntent().getStringExtra(RestartMainActivity.SDL_RESTART_PARAMS) );
try {