ShouldBlockStandbyMode() { return true; } Not Working
In the openvr_drive.h, there is this method: /** Returns true if the driver wants to block Standby mode. */ virtual bool ShouldBlockStandbyMode() = 0;
I used virtual bool ShouldBlockStandbyMode() { return true; } to tell the OpenVR not to set my custom driver in standby mode but it seems it's ineffective. It still changes the icons on the vr dashboard to standby status.
Make sure you do not use the "virtual" keyboard in your implementation. Your implementation should be
bool ShouldBlockStandbyMode() { return true; }
not
virtual bool ShouldBlockStandbyMode() { return true; }
Make sure you do not use the "virtual" keyboard in your implementation. Your implementation should be
bool ShouldBlockStandbyMode() { return true; }not
virtual bool ShouldBlockStandbyMode() { return true; }
I remove the virtual but still no success. SteamVR still shows my custom drivers icons in the compositor in standby mode.
By the way, 'virtual' keyword (in C++) is still valid to use when you're implementing a virtual method from the base class.
I like having virtual in the subclasses to make it clearer what's going on. I would suggest adding override if your compiler can handle C++11.
Let me answer your actual question though: That function is never called. Some guy named Joe removed the call in 2016 with this comment:
- Stopped using "should block standby" functions. I'll remove these in a future checkin.
So maybe I should actually go remove them from the interface. :)
There's no way to keep SteamVR from calling EnterStandby/LeaveStandby, but you can always just do nothing in those functions and use the same icon for Standby mode that you use for Ready.
polite cough https://github.com/ValveSoftware/openvr/blob/v1.16.8/headers/openvr_driver.h#L2929 polite cough