Skip to content

Commit 4c04177

Browse files
committed
Implement supportedFields field in EmscriptenDeviceMotionEvent
Fixes: #25647
1 parent b1072be commit 4c04177

File tree

6 files changed

+13
-3
lines changed

6 files changed

+13
-3
lines changed

src/lib/libhtml5.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ var LibraryHTML5 = {
814814
a = a || {};
815815
ag = ag || {};
816816
rr = rr || {};
817+
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenDeviceMotionEvent.supportedFields, 'supportedFields', 'i32') }}};
817818
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenDeviceMotionEvent.accelerationX, 'a["x"]', 'double') }}};
818819
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenDeviceMotionEvent.accelerationY, 'a["y"]', 'double') }}};
819820
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenDeviceMotionEvent.accelerationZ, 'a["z"]', 'double') }}};

src/struct_info.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,8 @@
961961
"accelerationIncludingGravityZ",
962962
"rotationRateAlpha",
963963
"rotationRateBeta",
964-
"rotationRateGamma"
964+
"rotationRateGamma",
965+
"supportedFields"
965966
],
966967
"EmscriptenOrientationChangeEvent": [
967968
"orientationIndex",

src/struct_info_generated.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@
560560
"accelerationZ": 16,
561561
"rotationRateAlpha": 48,
562562
"rotationRateBeta": 56,
563-
"rotationRateGamma": 64
563+
"rotationRateGamma": 64,
564+
"supportedFields": 72
564565
},
565566
"EmscriptenDeviceOrientationEvent": {
566567
"__size__": 32,

src/struct_info_generated_wasm64.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@
560560
"accelerationZ": 16,
561561
"rotationRateAlpha": 48,
562562
"rotationRateBeta": 56,
563-
"rotationRateGamma": 64
563+
"rotationRateGamma": 64,
564+
"supportedFields": 72
564565
},
565566
"EmscriptenDeviceOrientationEvent": {
566567
"__size__": 32,

test/runner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676
'wasm64_4gb',
7777
'esm_integration',
7878
'instance',
79+
'lto0',
80+
'lto1',
81+
'lto2',
7982
]
8083

8184
# The default core test mode, used when none is specified

test/test_interactive.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ def setUpClass(cls):
2525
print('Running the interactive tests. Make sure the browser allows popups from localhost.')
2626
print()
2727

28+
def test_html5_core(self):
29+
self.btest_exit('test_html5_core.c', cflags=['-DKEEP_ALIVE'])
30+
2831
def test_html5_fullscreen(self):
2932
self.btest('test_html5_fullscreen.c', expected='0', cflags=['-sDISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR', '-sEXPORTED_FUNCTIONS=_requestFullscreen,_enterSoftFullscreen,_main', '--shell-file', test_file('test_html5_fullscreen.html')])
3033

0 commit comments

Comments
 (0)