Skip to content

Commit 8690df6

Browse files
authored
Implement supportedFields field in EmscriptenDeviceMotionEvent (#25648)
Fixes: #25647
1 parent 87d9a75 commit 8690df6

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
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/codesize/test_codesize_hello_dylink_all.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"a.out.js": 245826,
2+
"a.out.js": 245868,
33
"a.out.nodebug.wasm": 597769,
4-
"total": 843595,
4+
"total": 843637,
55
"sent": [
66
"IMG_Init",
77
"IMG_Load",

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)