C++ How to know if you're in VR?

Does anyone know how to check if the game is running in VR mode from C++? I have a function that’s checking GEngine->HMDDevice->IsHMDEnabled(), but that doesn’t work. If I have my Vive headset connected, that returns true, even if I’m using the “Selected Viewport” option to play.

Anyone know the correct way?