summaryrefslogtreecommitdiff
path: root/modules/gdnative/arvr/arvr_interface_gdnative.cpp
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2018-05-26 10:03:25 +1000
committerBastiaan Olij <mux213@gmail.com>2018-05-27 20:31:41 +1000
commit8901b3cf0050b107edc68a46005e67fd9aaf2999 (patch)
treeb130394b4402e6c64d7b5b6e22fd3c1c50aa575c /modules/gdnative/arvr/arvr_interface_gdnative.cpp
parent6c649bd785b0901b0fcba37673f5256626d3f92d (diff)
[WIP] Adding version info to GDNative ARVR interfaces
Diffstat (limited to 'modules/gdnative/arvr/arvr_interface_gdnative.cpp')
-rw-r--r--modules/gdnative/arvr/arvr_interface_gdnative.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
index 49e0a19d9e..385c020a78 100644
--- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp
+++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp
@@ -217,6 +217,10 @@ void ARVRInterfaceGDNative::process() {
extern "C" {
void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_interface) {
+ // If our major version is 0 or bigger then 10, we're likely looking at our constructor pointer from an older plugin
+ ERR_EXPLAINC("GDNative ARVR interfaces build for Godot 3.0 are not supported");
+ ERR_FAIL_COND((p_interface->version.major == 0) || (p_interface->version.major > 10));
+
Ref<ARVRInterfaceGDNative> new_interface;
new_interface.instance();
new_interface->set_interface((godot_arvr_interface_gdnative *const)p_interface);