cancel
Showing results for 
Search instead for 
Did you mean: 

How to know when the Health and Safety Warning is acknowledged by user (Oculus SDK v1.3)?

LENS_Immersive
Honored Guest
Using Oculus SDK v1.3, how do you determine when the user has dismissed the Health and Safety warning screen that appears when the application is launched?

Thanks


5 REPLIES 5

Scawen
Heroic Explorer
Thankfully the health and safety warning has its own screen now instead of being displayed over the program as it was before!

You can use the ovrSessionStatus to detect when your program becomes visible.

Call ovr_GetSessionStatus to get the status and look at the IsVisible member.

galopin
Heroic Explorer
Something annoying in the new system, to limit conflict between the rift presentation interval and the monitor display, it is recommended to not sync to the vblank for the monitor swapchain, but ovr_submitFrame does not block as long as the health and useless safety message is on. It is a wast of resource to let a game run at 500fps a frame while the message is on…

Scawen
Heroic Explorer
Interesting, I'll add that one to my notes!

LENS_Immersive
Honored Guest
Thanks for the replies.

ovr_GetSessionStatus() returns a ovrSessionStatus structure that has IsVisible set to true, even when the HSW is being displayed.

I've found a hack solution by monitoring the %LOCALAPPDATA%\Oculus\Service_*.txt  file, looking for the line when the HSV is acknowledged.

It would be ideal if there was an official callback or something to let the app. know that the HSV has been acknowledged (and a corresponding function to know if it's being displayed).



Scawen
Heroic Explorer
Thanks for the info.  Sorry about my false information.  I had assumed that IsVisible would be false when your program is not visible!  So (1) this seems to be a bug and (2) there should be a way to know that the HSW is still visible.