Added Emscripten support for Sensor API

This commit is contained in:
antonegas
2025-10-26 01:52:55 +02:00
committed by Sam Lantinga
parent 7381a2b072
commit 33f1008d01
6 changed files with 230 additions and 0 deletions

View File

@@ -1715,6 +1715,15 @@ elseif(EMSCRIPTEN)
set(HAVE_CLOCK_GETTIME 1)
endif()
if(SDL_SENSOR)
set(SDL_SENSOR_EMSCRIPTEN 1)
set(HAVE_SDL_SENSORS TRUE)
sdl_glob_sources(
"${SDL3_SOURCE_DIR}/src/sensor/emscripten/*.c"
"${SDL3_SOURCE_DIR}/src/sensor/emscripten/*.h"
)
endif()
if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_EMSCRIPTEN 1)
sdl_glob_sources(