mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
staging some oculus helper code
This commit is contained in:
parent
1fc51445d0
commit
c22ad2b15a
2 changed files with 13 additions and 0 deletions
|
@ -174,6 +174,18 @@ ovrTrackingState ovr::getTrackingState(double absTime, ovrBool latencyMarker) {
|
|||
return result;
|
||||
}
|
||||
|
||||
QString ovr::getLoggedInUserID() {
|
||||
ovr_GetLoggedInUserID();
|
||||
ovrMessageHandle message = ovr_PopMessage();
|
||||
if (!ovr_Message_IsError(message)) {
|
||||
ovrUserHandle user = ovr_Message_GetUser(message);
|
||||
qCDebug(oculusLog) << "User is: " << ovr_User_GetID(user) << ", " << ovr_User_GetOculusID(user);
|
||||
} else {
|
||||
auto error = ovr_Message_GetError(message);
|
||||
qCDebug(oculusLog) << "User failure error: " << ovr_Error_GetMessage(error);
|
||||
}
|
||||
}
|
||||
|
||||
QString ovr::getError() {
|
||||
static ovrErrorInfo error;
|
||||
ovr_GetLastErrorInfo(&error);
|
||||
|
|
|
@ -29,6 +29,7 @@ struct ovr {
|
|||
static ovrSessionStatus getStatus();
|
||||
static ovrSessionStatus getStatus(ovrResult& result);
|
||||
static ovrTrackingState getTrackingState(double absTime = 0.0, ovrBool latencyMarker = ovrFalse);
|
||||
static QString getLoggedInUserID();
|
||||
static QString getError();
|
||||
static bool handleOVREvents();
|
||||
|
||||
|
|
Loading…
Reference in a new issue