Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
e1ef3f2d
Unverified
Commit
e1ef3f2d
authored
Jun 28, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 28, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39904 from m4gr3d/fix_focus_aware_option_master
Fix the logic to enable focus awareness
parents
46b36805
2d53b817
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
export.cpp
platform/android/export/export.cpp
+4
-2
AndroidManifest.xml
platform/android/java/app/AndroidManifest.xml
+2
-2
No files found.
platform/android/export/export.cpp
View file @
e1ef3f2d
...
...
@@ -862,6 +862,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
String
tname
=
string_table
[
name
];
uint32_t
attrcount
=
decode_uint32
(
&
p_manifest
[
iofs
+
20
]);
iofs
+=
28
;
bool
is_focus_aware_metadata
=
false
;
for
(
uint32_t
i
=
0
;
i
<
attrcount
;
i
++
)
{
uint32_t
attr_nspace
=
decode_uint32
(
&
p_manifest
[
iofs
]);
...
...
@@ -929,9 +930,9 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
}
}
if
(
tname
==
"meta-data"
&&
attrname
==
"value"
&&
value
==
"oculus_focus_aware_value"
)
{
if
(
tname
==
"meta-data"
&&
attrname
==
"value"
&&
is_focus_aware_metadata
)
{
// Update the focus awareness meta-data value
string_table
.
write
[
attr_value
]
=
xr_mode_index
==
/* XRMode.OVR */
1
&&
focus_awareness
?
"true"
:
"false"
;
encode_uint32
(
xr_mode_index
==
/* XRMode.OVR */
1
&&
focus_awareness
?
0xFFFFFFFF
:
0
,
&
p_manifest
.
write
[
iofs
+
16
])
;
}
if
(
tname
==
"meta-data"
&&
attrname
==
"value"
&&
value
==
"plugins_value"
&&
!
plugins_names
.
empty
())
{
...
...
@@ -939,6 +940,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
string_table
.
write
[
attr_value
]
=
plugins_names
;
}
is_focus_aware_metadata
=
tname
==
"meta-data"
&&
attrname
==
"name"
&&
value
==
"com.oculus.vr.focusaware"
;
iofs
+=
20
;
}
...
...
platform/android/java/app/AndroidManifest.xml
View file @
e1ef3f2d
...
...
@@ -45,8 +45,8 @@
android:resizeableActivity=
"false"
tools:ignore=
"UnusedAttribute"
>
<!-- Focus awareness metadata
popul
ated at export time if the user enables it in the 'Xr Features' section. -->
<meta-data
android:name=
"com.oculus.vr.focusaware"
android:value=
"
oculus_focus_aware_valu
e"
/>
<!-- Focus awareness metadata
is upd
ated at export time if the user enables it in the 'Xr Features' section. -->
<meta-data
android:name=
"com.oculus.vr.focusaware"
android:value=
"
fals
e"
/>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment