Skip to content

Commit 493a2d7

Browse files
committed
fix: correct motion callback signature in JNI
1 parent e96d1a6 commit 493a2d7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

native/src/CubismUserModel_JNI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class JniUserModel : public CubismUserModel {
3030
auto* motion = CubismMotion::Create(buffer, size);
3131
if (!motion) return;
3232

33-
motion->SetFinishedMotionHandlerAndMotionCustomData([](ACubismMotion* self, void* data) {
34-
auto* model = static_cast<JniUserModel*>(data);
33+
motion->SetFinishedMotionHandlerAndMotionCustomData([](ACubismMotion* self) {
34+
auto* model = static_cast<JniUserModel*>(self->GetFinishedMotionCustomData());
3535
model->notifyFinished();
3636
CubismMotion::Delete(static_cast<CubismMotion*>(self));
3737
}, this);
@@ -185,4 +185,4 @@ JNIEXPORT void JNICALL Java_dev_eatgrapes_live2d_CubismUserModel_drawNative(JNIE
185185
}
186186
}
187187

188-
}
188+
}

0 commit comments

Comments
 (0)