call oc_on_mouse_wheel() when getting a wheel event #130

Merged
MartinFouilleul merged 1 commits from mouse-wheel-event into main 2023-09-19 06:34:15 +00:00
1 changed files with 14 additions and 0 deletions

View File

@ -680,6 +680,20 @@ i32 orca_runloop(void* user)
}
break;
case OC_EVENT_MOUSE_WHEEL:
{
if(exports[OC_EXPORT_MOUSE_WHEEL])
{
const void* args[2] = { &event->mouse.deltaX, &event->mouse.deltaY };
M3Result res = m3_Call(exports[OC_EXPORT_MOUSE_WHEEL], 2, args);
if(res)
{
ORCA_WASM3_ABORT(app->env.m3Runtime, res, "Runtime error");
}
}
}
break;
case OC_EVENT_MOUSE_MOVE:
{
if(exports[OC_EXPORT_MOUSE_MOVE])