MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / can_capture_pointer

Method can_capture_pointer

platform/android/java_godot_view_wrapper.cpp:61–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61bool GodotJavaViewWrapper::can_capture_pointer() const {
62 // We can capture the pointer if the other jni capture method ids are initialized,
63 // and GodotView#canCapturePointer() returns true.
64 if (_request_pointer_capture != nullptr && _release_pointer_capture != nullptr && _can_capture_pointer != nullptr) {
65 JNIEnv *env = get_jni_env();
66 ERR_FAIL_NULL_V(env, false);
67
68 return env->CallBooleanMethod(_godot_view, _can_capture_pointer);
69 }
70
71 return false;
72}
73
74void GodotJavaViewWrapper::request_pointer_capture() {
75 if (_request_pointer_capture != nullptr) {

Callers 1

_mouse_update_modeMethod · 0.80

Calls 1

get_jni_envFunction · 0.85

Tested by

no test coverage detected