Skip to content

Commit be1d442

Browse files
committed
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); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 parent f6c3af9 commit be1d442

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sensor/emscripten/SDL_emscriptensensor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void SDL_EMSCRIPTEN_GyroscopeCallback(const EmscriptenDeviceMotionEvent *
6767
SDL_sensors[1].new_data = true;
6868
}
6969

70-
static int SDL_EMSCRIPTEN_SensorCallback(int event_type, const EmscriptenDeviceMotionEvent *event, void *user_data)
70+
static EM_BOOL SDL_EMSCRIPTEN_SensorCallback(int event_type, const EmscriptenDeviceMotionEvent *event, void *user_data)
7171
{
7272
SDL_EMSCRIPTEN_AccelerometerCallback(event);
7373
SDL_EMSCRIPTEN_GyroscopeCallback(event);

0 commit comments

Comments
 (0)