Android: Jni was missing onOverlayButton (#405)

This commit is contained in:
NullVector 2026-10-10 21:24:36 +10:30 committed by GitHub
parent 45efeaf928
commit d1c5791fb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -201,6 +201,18 @@ JNIEXPORT void JNICALL Java_org_nxemu_features_input_NativeInput_onGamePadAxisEv
env->ReleaseStringUTFChars(j_guid, guid);
}
JNIEXPORT void JNICALL Java_org_nxemu_features_input_NativeInput_onOverlayButtonEventImpl(
JNIEnv * /*env*/, jobject /*obj*/, jint j_port, jint j_button_id, jint j_action)
{
EmulationSession::GetInstance().SetOverlayButton(j_port, j_button_id, j_action == 1);
}
JNIEXPORT void JNICALL Java_org_nxemu_features_input_NativeInput_onOverlayJoystickEventImpl(
JNIEnv * /*env*/, jobject /*obj*/, jint j_port, jint j_stick_id, jfloat j_x, jfloat j_y)
{
EmulationSession::GetInstance().SetOverlayJoystick(j_port, j_stick_id, j_x, j_y);
}
JNIEXPORT void JNICALL Java_org_nxemu_features_input_NativeInput_registerController(JNIEnv * /*env*/, jobject /*obj*/, jobject j_device)
{
IOperatingSystem * os = CurrentOS();