Struct CRTBeamStatus
A snapshot of the beam simulator's state, for a status display or a settings screen.
Inherited Members
Namespace: Scylla.TextMode.CRT
Assembly: ScyllaTextMode.CRT.dll
Syntax
public readonly struct CRTBeamStatus
Remarks
Get one from GetStatus(). The snapshot is a plain value that does not change afterwards, so read it again when the screen refreshes. When Enabled is true and Active is false, Reason says in words what stops the simulator, for example that the display is too slow, that vSync is not in effect or that Reduce Motion is on.
Constructors
CRTBeamStatus(bool, bool, string, double, bool, float, float, float, float, int, long)
Creates a snapshot from the given values. GetStatus() is the usual way to get one; the constructor is public so tests and status screens can build their own.
Declaration
public CRTBeamStatus(bool enabled, bool active, string reason, double displayRate, bool rateOverridden, float crtRate, float frames, float gain, float measuredRate, int vSyncCount, long missedRefreshes)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | enabled | Whether the simulator is wanted. |
| bool | active | Whether it runs this frame. |
| string | reason | Why it does not run while it is wanted, or null. |
| double | displayRate | The display refresh rate in hertz. |
| bool | rateOverridden | Whether the display rate was set by hand. |
| float | crtRate | The simulated CRT's refresh rate in hertz. |
| float | frames | Display refreshes per CRT frame. |
| float | gain | The gain in use. |
| float | measuredRate | The measured frame rate. |
| int | vSyncCount | The vSync count. |
| long | missedRefreshes | Refreshes that passed without a frame. |
Fields
Active
Whether the simulator runs this frame, from IsActive.
Declaration
public readonly bool Active
Field Value
| Type | Description |
|---|---|
| bool |
CRTRate
The simulated CRT's refresh rate in hertz.
Declaration
public readonly float CRTRate
Field Value
| Type | Description |
|---|---|
| float |
DisplayRate
The display refresh rate in hertz it counts with.
Declaration
public readonly double DisplayRate
Field Value
| Type | Description |
|---|---|
| double |
Enabled
Whether the simulator is wanted, from Enabled.
Declaration
public readonly bool Enabled
Field Value
| Type | Description |
|---|---|
| bool |
Frames
Display refreshes per CRT frame as Frames(double, double, bool) works it out, or 0 when the display is too slow or its rate is unknown.
Declaration
public readonly float Frames
Field Value
| Type | Description |
|---|---|
| float |
Gain
The gain in use, from 0 to 1; see EffectiveGain.
Declaration
public readonly float Gain
Field Value
| Type | Description |
|---|---|
| float |
MeasuredRate
The frame rate the game actually reaches, an exponential average of recent frame times, so how far back it reaches depends on the frame rate.
Declaration
public readonly float MeasuredRate
Field Value
| Type | Description |
|---|---|
| float |
MissedRefreshes
Refreshes that passed without a frame since the simulator last became active, from MissedRefreshes.
Declaration
public readonly long MissedRefreshes
Field Value
| Type | Description |
|---|---|
| long |
RateOverridden
Whether DisplayRate comes from RefreshRateOverride.
Declaration
public readonly bool RateOverridden
Field Value
| Type | Description |
|---|---|
| bool |
Reason
A short sentence that says why the simulator does not run while it is wanted, or null when it runs or is not wanted.
Declaration
public readonly string Reason
Field Value
| Type | Description |
|---|---|
| string |
VSyncCount
The value of QualitySettings.vSyncCount. The simulator needs 1, one refresh per frame.
Declaration
public readonly int VSyncCount
Field Value
| Type | Description |
|---|---|
| int |