summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-01 07:45:28 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-01 07:45:28 +0100
commite8240031e78e4cdfd0afad8e6b5f23b68686bfd5 (patch)
tree5101632d655794dd87f0cfef80210c48ceed1b7d /servers
parenta5be03e59a82de61b8c65e60719ca5b58a10db37 (diff)
parentc7f4ca36a4541686d5944f7bf88e1aa7d32cc24f (diff)
Merge pull request #71479 from raulsntos/virtual-return-type
Use enum instead of int in virtual methods return type
Diffstat (limited to 'servers')
-rw-r--r--servers/xr/xr_interface_extension.cpp8
-rw-r--r--servers/xr/xr_interface_extension.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/servers/xr/xr_interface_extension.cpp b/servers/xr/xr_interface_extension.cpp
index 63e862f605..0ff59d2a39 100644
--- a/servers/xr/xr_interface_extension.cpp
+++ b/servers/xr/xr_interface_extension.cpp
@@ -136,9 +136,9 @@ PackedStringArray XRInterfaceExtension::get_suggested_pose_names(const StringNam
}
XRInterface::TrackingStatus XRInterfaceExtension::get_tracking_status() const {
- uint32_t status = XR_UNKNOWN_TRACKING;
+ XRInterface::TrackingStatus status = XR_UNKNOWN_TRACKING;
GDVIRTUAL_CALL(_get_tracking_status, status);
- return TrackingStatus(status);
+ return status;
}
void XRInterfaceExtension::trigger_haptic_pulse(const String &p_action_name, const StringName &p_tracker_name, double p_frequency, double p_amplitude, double p_duration_sec, double p_delay_sec) {
@@ -152,9 +152,9 @@ bool XRInterfaceExtension::supports_play_area_mode(XRInterface::PlayAreaMode p_m
}
XRInterface::PlayAreaMode XRInterfaceExtension::get_play_area_mode() const {
- uint32_t mode = XR_PLAY_AREA_UNKNOWN;
+ XRInterface::PlayAreaMode mode = XR_PLAY_AREA_UNKNOWN;
GDVIRTUAL_CALL(_get_play_area_mode, mode);
- return XRInterface::PlayAreaMode(mode);
+ return mode;
}
bool XRInterfaceExtension::set_play_area_mode(XRInterface::PlayAreaMode p_mode) {
diff --git a/servers/xr/xr_interface_extension.h b/servers/xr/xr_interface_extension.h
index 39cd284e5c..454a50cb28 100644
--- a/servers/xr/xr_interface_extension.h
+++ b/servers/xr/xr_interface_extension.h
@@ -71,7 +71,7 @@ public:
GDVIRTUAL0RC(PackedStringArray, _get_suggested_tracker_names);
GDVIRTUAL1RC(PackedStringArray, _get_suggested_pose_names, const StringName &);
- GDVIRTUAL0RC(uint32_t, _get_tracking_status);
+ GDVIRTUAL0RC(XRInterface::TrackingStatus, _get_tracking_status);
GDVIRTUAL6(_trigger_haptic_pulse, const String &, const StringName &, double, double, double, double);
/** specific to VR **/
@@ -81,8 +81,8 @@ public:
virtual PackedVector3Array get_play_area() const override; /* if available, returns an array of vectors denoting the play area the player can move around in */
GDVIRTUAL1RC(bool, _supports_play_area_mode, XRInterface::PlayAreaMode);
- GDVIRTUAL0RC(uint32_t, _get_play_area_mode);
- GDVIRTUAL1RC(bool, _set_play_area_mode, uint32_t);
+ GDVIRTUAL0RC(XRInterface::PlayAreaMode, _get_play_area_mode);
+ GDVIRTUAL1RC(bool, _set_play_area_mode, XRInterface::PlayAreaMode);
GDVIRTUAL0RC(PackedVector3Array, _get_play_area);
/** specific to AR **/