From 959af3613d9fd4d99001480c65428107dff4e69f Mon Sep 17 00:00:00 2001 From: VewDev <36-VewDev@users.noreply.git.ryujinx.app> Date: Wed, 3 Sep 2025 03:25:43 -0500 Subject: [PATCH] doc: update documentation for Shared property in Switch class (ryubing/ryujinx!137) See merge request ryubing/ryujinx!137 --- src/Ryujinx.HLE/Switch.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Ryujinx.HLE/Switch.cs b/src/Ryujinx.HLE/Switch.cs index e1aa8e0e4..03fba1514 100644 --- a/src/Ryujinx.HLE/Switch.cs +++ b/src/Ryujinx.HLE/Switch.cs @@ -20,6 +20,18 @@ namespace Ryujinx.HLE { public class Switch : IDisposable { + /// + /// Currently running emulated Switch, if there is one. + /// + /// Proper usage of this property null checks it before use, unless the caller is certain that the emulation is running. + /// + /// + /// In case the emulation is running, there might be a way to directly pass the instance, which is preferred. + /// + /// + /// The instance is set to this on any instantiation, and set to null on any disposal. + /// + /// public static Switch Shared { get; private set; } public HleConfiguration Configuration { get; }