-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Pause the game, if it is in the Driving mode, and the VR view loses focus #17
Comments
I think this feature is possible with the OpenXR runtime. I don't know if this feature is possible with the OpenVR runtime. The following is a sketch of how I think it might work. I'm a software engineer, but I have no experience with VR runtimes. Here's some pseudocode: state := vr.current_session_state()
if state != focused:
if rbr.gameMode == Driving:
rbr.pause_game()
render_desktop_view()
# Do not render the VR view
return From what I can tell, this belongs in the I will experiment with this idea in my fork, and if I make progress, I'll open a PR. From the OpenXR docs, it looks like there is exactly one state in which the game is visible to the user, and can receive XR input: XR_SESSION_STATE_FOCUSED. |
This sounds like a good idea to me. The correct place to handle this would be in |
Thanks for the feedback!
That makes sense. I definitely hallucinated the I learned a little bit from the original (?) reverse engineering report on RBR. I'll try to set a conditional breakpoint that triggers when the "game mode" address is set to the pause value. If I can do that, maybe I can find out how to call the function that pauses the game. I was also thinking about a completely different approach: sending an input event that is bound to the pause command. |
Today, when the game is in Driving mode, and the VR view loses focus, the game is not paused.
There are different reasons that the VR view can lose focus. One reason might be that the player removes an HMD with a proximity sensor from their head. Another reason might be that the HMD displays an overlay that covers the game view.
Some personal motivation for this feature: I use OpenRBRVR with the OpenXR runtime and a Meta Quest 3 HMD. There is a known issue, where the HMD suddenly and unpredictably displays a dialog that covers the game view, and requires the user to acknowledge the dialog. If I am driving and I receive this dialog, I nearly always crash, because I am not able to pause the game in time. That can be frustrating, especially when it happens in the middle of a long stage. It could also cause a DNF in an online race.
The text was updated successfully, but these errors were encountered: