mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-13 07:13:35 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user