Fixed error: incompatible function pointer types passing

SDL/src/sensor/emscripten/SDL_emscriptensensor.c:80:5: error: incompatible function pointer types passing
      'int (*)(int, const EmscriptenDeviceMotionEvent *, void *)' (aka 'int (*)(int, const struct EmscriptenDeviceMotionEvent *, void *)') to parameter of type 'em_devicemotion_callback_func' (aka
      'bool (*)(int, const struct EmscriptenDeviceMotionEvent *, void *)') [-Wincompatible-function-pointer-types]
   80 |     emscripten_set_devicemotion_callback((void *)0, false, &SDL_EMSCRIPTEN_SensorCallback);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Sam Lantinga
2025-10-27 09:36:46 -07:00
parent f6c3af9c8c
commit be1d44279c

View File

@@ -67,7 +67,7 @@ static void SDL_EMSCRIPTEN_GyroscopeCallback(const EmscriptenDeviceMotionEvent *
SDL_sensors[1].new_data = true;
}
static int SDL_EMSCRIPTEN_SensorCallback(int event_type, const EmscriptenDeviceMotionEvent *event, void *user_data)
static EM_BOOL SDL_EMSCRIPTEN_SensorCallback(int event_type, const EmscriptenDeviceMotionEvent *event, void *user_data)
{
SDL_EMSCRIPTEN_AccelerometerCallback(event);
SDL_EMSCRIPTEN_GyroscopeCallback(event);