mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 05:00:27 +02:00
Fix for SDL stalling the pacing thread
This commit is contained in:
1 parent
1d66ae87bf
commit
b2353e1410
7 files changed
+141
-25
No files matched your search
@@ -76,8 +76,10 @@ struct OpenXRPointerScreen {
|
||||
// Lifetime: Create after the session exists (attaches the action set, which
|
||||
// OpenXR permits once per session), Sync once per xrWaitFrame, Idle while the
|
||||
// session is not running, Destroy before the session is destroyed. All of them
|
||||
// run on the XR pacing thread; SDL's virtual joystick setters and the Wii
|
||||
// Remote bridge are internally locked, so the game thread may read concurrently.
|
||||
// run on the XR pacing thread. The Wii Remote bridge is internally locked, so
|
||||
// the game thread may read it concurrently, and the virtual gamepad is only
|
||||
// published here: OpenXRApplyVirtualGamepad() performs the SDL writes on the
|
||||
// game thread, keeping SDL's joystick lock off this thread entirely.
|
||||
class OpenXRInput final {
|
||||
public:
|
||||
explicit OpenXRInput(OpenXRLogCallback logger = {});
|
||||
@@ -185,6 +187,10 @@ private:
|
||||
std::string m_last_error;
|
||||
};
|
||||
|
||||
// Game thread: writes the gamepad the pacing thread last published, if any.
|
||||
// Does nothing when no OpenXR controllers are attached.
|
||||
void OpenXRApplyVirtualGamepad() noexcept;
|
||||
|
||||
} // namespace mkw::vr
|
||||
|
||||
#endif // defined(MKW_ENABLE_OPENXR)
|
||||
Reference in new issue
Block a user