diff options
author | Bastiaan Olij <mux213@gmail.com> | 2019-03-13 20:43:21 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2019-04-27 08:39:21 +1000 |
commit | 1a1b35721a89e2b27d2b18b8b746c37fd56734aa (patch) | |
tree | 31a52c25ee18de46a3cba7aade5c8701f80e5161 /modules/gdnative/arvr | |
parent | ac95466aff13e0444ec897ba14e89154fa132c63 (diff) |
Send notifications to ARVRInterfaces
Diffstat (limited to 'modules/gdnative/arvr')
-rw-r--r-- | modules/gdnative/arvr/arvr_interface_gdnative.cpp | 9 | ||||
-rw-r--r-- | modules/gdnative/arvr/arvr_interface_gdnative.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp index 8c602e0cba..eac8e26160 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp +++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp @@ -222,6 +222,15 @@ void ARVRInterfaceGDNative::process() { interface->process(data); } +void ARVRInterfaceGDNative::notification(int p_what) { + ERR_FAIL_COND(interface == NULL); + + // this is only available in interfaces that implement 1.1 or later + if ((interface->version.major > 1) || ((interface->version.major == 1) && (interface->version.minor > 0))) { + interface->notification(p_what); + } +} + ///////////////////////////////////////////////////////////////////////////////////// // some helper callbacks diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.h b/modules/gdnative/arvr/arvr_interface_gdnative.h index 3f966ece51..86396b067a 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.h +++ b/modules/gdnative/arvr/arvr_interface_gdnative.h @@ -82,6 +82,7 @@ public: virtual void commit_for_eye(ARVRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect); virtual void process(); + virtual void notification(int p_what); }; #endif // ARVR_INTERFACE_GDNATIVE_H |