mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
better check for if oculus is running
This commit is contained in:
parent
ca0916886a
commit
7e674ba3c4
4 changed files with 10 additions and 2 deletions
|
@ -106,8 +106,8 @@ bool LoginDialog::isSteamRunning() const {
|
|||
}
|
||||
|
||||
bool LoginDialog::isOculusRunning() const {
|
||||
auto oculusPlatform = PluginManager::getInstance()->getOculusPlatformPlugin();
|
||||
return (oculusPlatform != nullptr);
|
||||
auto oculusPlatformPlugin = PluginManager::getInstance()->getOculusPlatformPlugin();
|
||||
return (oculusPlatformPlugin && oculusPlatformPlugin->isRunning());
|
||||
}
|
||||
|
||||
void LoginDialog::dismissLoginDialog() {
|
||||
|
|
|
@ -19,6 +19,8 @@ public:
|
|||
|
||||
virtual const QString getName() const = 0;
|
||||
|
||||
virtual const bool isRunning() const = 0;
|
||||
|
||||
virtual void requestNonceAndUserID(NonceUserIDCallback callback) = 0;
|
||||
|
||||
virtual void handleOVREvents() = 0;
|
||||
|
|
|
@ -24,6 +24,10 @@ OculusAPIPlugin::~OculusAPIPlugin() {
|
|||
hifi::ovr::releaseRenderSession(_session);
|
||||
}
|
||||
|
||||
const bool OculusAPIPlugin::isRunning() const {
|
||||
return (qApp->property(hifi::properties::OCULUS_STORE).toBool());
|
||||
}
|
||||
|
||||
void OculusAPIPlugin::requestNonceAndUserID(NonceUserIDCallback callback) {
|
||||
_nonceUserIDCallback = callback;
|
||||
ovr_User_GetUserProof();
|
||||
|
|
|
@ -20,6 +20,8 @@ public:
|
|||
virtual ~OculusAPIPlugin();
|
||||
const QString getName() const { return NAME; }
|
||||
|
||||
const bool isRunning() const;
|
||||
|
||||
virtual void requestNonceAndUserID(NonceUserIDCallback callback);
|
||||
|
||||
virtual void handleOVREvents();
|
||||
|
|
Loading…
Reference in a new issue