SHA256
Change Disable Tile Culling Default to False
This commit is contained in:
2 files changed
+273
-273
No files matched your search
+272
-272
@@ -1,272 +1,272 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace ADOFAIRenderer.Data;
|
namespace ADOFAIRenderer.Data;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Settings of one render: resolution, frame rates, encoding and advanced options. Serialized to JSON in the preset
|
/// Settings of one render: resolution, frame rates, encoding and advanced options. Serialized to JSON in the preset
|
||||||
/// files (PresetManager). <see cref="ADOFAIRenderer.API.RenderSession.Start"/> renders with a copy (<see cref="Clone"/>).
|
/// files (PresetManager). <see cref="ADOFAIRenderer.API.RenderSession.Start"/> renders with a copy (<see cref="Clone"/>).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressMessage("ReSharper", "RedundantDefaultMemberInitializer")]
|
[SuppressMessage("ReSharper", "RedundantDefaultMemberInitializer")]
|
||||||
public class RenderConfig
|
public class RenderConfig
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Game frames simulated per second of render time (the game clock advances 1 / RenderFPS seconds per frame).
|
/// Game frames simulated per second of render time (the game clock advances 1 / RenderFPS seconds per frame).
|
||||||
/// Values above <see cref="VideoFPS"/> render extra frames between video frames, which are not captured
|
/// Values above <see cref="VideoFPS"/> render extra frames between video frames, which are not captured
|
||||||
/// (the game state then advances in smaller time steps).
|
/// (the game state then advances in smaller time steps).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double RenderFPS { get; set; }
|
public double RenderFPS { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Frame rate of the output video. The effective rate is min(VideoFPS, RenderFPS).
|
/// Frame rate of the output video. The effective rate is min(VideoFPS, RenderFPS).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double VideoFPS { get; set; }
|
public double VideoFPS { get; set; }
|
||||||
|
|
||||||
/// <summary>Width of the rendered frames and the output video in pixels (also reported by the Screen.width patch).</summary>
|
/// <summary>Width of the rendered frames and the output video in pixels (also reported by the Screen.width patch).</summary>
|
||||||
public int RenderWidth { get; set; }
|
public int RenderWidth { get; set; }
|
||||||
|
|
||||||
/// <summary>Height of the rendered frames and the output video in pixels (also reported by the Screen.height patch).</summary>
|
/// <summary>Height of the rendered frames and the output video in pixels (also reported by the Screen.height patch).</summary>
|
||||||
public int RenderHeight { get; set; }
|
public int RenderHeight { get; set; }
|
||||||
|
|
||||||
/// <summary>Video encoder settings.</summary>
|
/// <summary>Video encoder settings.</summary>
|
||||||
public VideoEncodingConfig VideoConfig { get; set; } = new();
|
public VideoEncodingConfig VideoConfig { get; set; } = new();
|
||||||
|
|
||||||
/// <summary>Audio rendering and encoder settings.</summary>
|
/// <summary>Audio rendering and encoder settings.</summary>
|
||||||
public AudioEncodingConfig AudioConfig { get; set; } = new();
|
public AudioEncodingConfig AudioConfig { get; set; } = new();
|
||||||
|
|
||||||
/// <summary>Advanced options (random seed, spectrum processing, tile hiding, container, planet colors).</summary>
|
/// <summary>Advanced options (random seed, spectrum processing, tile hiding, container, planet colors).</summary>
|
||||||
public AdvancedConfig AdvancedConfig { get; set; } = new();
|
public AdvancedConfig AdvancedConfig { get; set; } = new();
|
||||||
|
|
||||||
/// <summary>Seconds of render time recorded after the end condition first holds (default 15).</summary>
|
/// <summary>Seconds of render time recorded after the end condition first holds (default 15).</summary>
|
||||||
public double DelayAfterEnd { get; set; } = 15;
|
public double DelayAfterEnd { get; set; } = 15;
|
||||||
|
|
||||||
/// <summary>Whether the judgement texts (hit accuracy texts) are shown during the render (scrHitTextManagerPatch). Default false.</summary>
|
/// <summary>Whether the judgement texts (hit accuracy texts) are shown during the render (scrHitTextManagerPatch). Default false.</summary>
|
||||||
public bool ShowJudgementText { get; set; } = false;
|
public bool ShowJudgementText { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Copies every value of <paramref name="source"/> into this object; the nested configs are copied value by value
|
/// Copies every value of <paramref name="source"/> into this object; the nested configs are copied value by value
|
||||||
/// into the existing nested objects. Does nothing when <paramref name="source"/> is null.
|
/// into the existing nested objects. Does nothing when <paramref name="source"/> is null.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void CopyFrom(RenderConfig? source)
|
public void CopyFrom(RenderConfig? source)
|
||||||
{
|
{
|
||||||
if (source == null) return;
|
if (source == null) return;
|
||||||
RenderFPS = source.RenderFPS;
|
RenderFPS = source.RenderFPS;
|
||||||
VideoFPS = source.VideoFPS;
|
VideoFPS = source.VideoFPS;
|
||||||
RenderWidth = source.RenderWidth;
|
RenderWidth = source.RenderWidth;
|
||||||
RenderHeight = source.RenderHeight;
|
RenderHeight = source.RenderHeight;
|
||||||
DelayAfterEnd = source.DelayAfterEnd;
|
DelayAfterEnd = source.DelayAfterEnd;
|
||||||
ShowJudgementText = source.ShowJudgementText;
|
ShowJudgementText = source.ShowJudgementText;
|
||||||
|
|
||||||
VideoConfig.CopyFrom(source.VideoConfig);
|
VideoConfig.CopyFrom(source.VideoConfig);
|
||||||
AudioConfig.CopyFrom(source.AudioConfig);
|
AudioConfig.CopyFrom(source.AudioConfig);
|
||||||
AdvancedConfig.CopyFrom(source.AdvancedConfig);
|
AdvancedConfig.CopyFrom(source.AdvancedConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Returns a deep copy (nested configs are new objects).</summary>
|
/// <summary>Returns a deep copy (nested configs are new objects).</summary>
|
||||||
public RenderConfig Clone()
|
public RenderConfig Clone()
|
||||||
{
|
{
|
||||||
var clone = new RenderConfig();
|
var clone = new RenderConfig();
|
||||||
clone.CopyFrom(this);
|
clone.CopyFrom(this);
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Advanced render options.</summary>
|
/// <summary>Advanced render options.</summary>
|
||||||
[SuppressMessage("ReSharper", "RedundantDefaultMemberInitializer")]
|
[SuppressMessage("ReSharper", "RedundantDefaultMemberInitializer")]
|
||||||
public class AdvancedConfig
|
public class AdvancedConfig
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Seed for UnityEngine.Random set before the game scene loads, so random visual effects repeat between renders;
|
/// Seed for UnityEngine.Random set before the game scene loads, so random visual effects repeat between renders;
|
||||||
/// null leaves the random state unchanged.
|
/// null leaves the random state unchanged.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? RandomSeed { get; set; } = null;
|
public int? RandomSeed { get; set; } = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When true, AudioSource.GetSpectrumData is answered from the offline song audio at the render time
|
/// When true, AudioSource.GetSpectrumData is answered from the offline song audio at the render time
|
||||||
/// (AudioSpectrumGenerator), so audio-reactive visuals follow the rendered audio. Default true.
|
/// (AudioSpectrumGenerator), so audio-reactive visuals follow the rendered audio. Default true.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ProcessAudio { get; set; } = true;
|
public bool ProcessAudio { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When true, the level's floor tiles (including hold meshes and the portal particles of the level's floors) and the
|
/// When true, the level's floor tiles (including hold meshes and the portal particles of the level's floors) and the
|
||||||
/// planets are hidden during the render, so only the background and decorations remain (scnGamePatch, scrFloorPatch,
|
/// planets are hidden during the render, so only the background and decorations remain (scnGamePatch, scrFloorPatch,
|
||||||
/// RenderManager.OnLastUpdate). Default false.
|
/// RenderManager.OnLastUpdate). Default false.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool NonTile { get; set; } = false;
|
public bool NonTile { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When true, the game's bloom (<c>VideoBloom</c>) computes its blur size as if the frame were 720 pixels high, so the
|
/// When true, the game's bloom (<c>VideoBloom</c>) computes its blur size as if the frame were 720 pixels high, so the
|
||||||
/// blur passes on the 198-pixel-high bloom buffer are the same as in a 720p frame at any render height
|
/// blur passes on the 198-pixel-high bloom buffer are the same as in a 720p frame at any render height
|
||||||
/// (VideoBloomPatch). Default false.
|
/// (VideoBloomPatch). Default false.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HighResBloomCorrection { get; set; } = false;
|
public bool HighResBloomCorrection { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When true, fixes in-game and render bugs during SetFramerate events (where objects disappear on the first frame
|
/// When true, fixes in-game and render bugs during SetFramerate events (where objects disappear on the first frame
|
||||||
/// or parallax/tiles lag behind) by deferring manual camera rendering to the end of the frame after all LateUpdates.
|
/// or parallax/tiles lag behind) by deferring manual camera rendering to the end of the frame after all LateUpdates.
|
||||||
/// Default true.
|
/// Default true.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool FixCustomFrameRate { get; set; } = true;
|
public bool FixCustomFrameRate { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When true, prevents floor tiles from being disabled when outside the camera frustum (scrFloor.OnBecameInvisible),
|
/// When true, prevents floor tiles from being disabled when outside the camera frustum (scrFloor.OnBecameInvisible),
|
||||||
/// eliminating the 1-frame update lag/glitch when tiles enter the screen. Default true.
|
/// eliminating the 1-frame update lag/glitch when tiles enter the screen. Default false.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DisableTileCulling { get; set; } = true;
|
public bool DisableTileCulling { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When true, hides placeholder decorations (default tree-in-circle sprite) that failed to load or are empty.
|
/// When true, hides placeholder decorations (default tree-in-circle sprite) that failed to load or are empty.
|
||||||
/// Default false.
|
/// Default false.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HideFailedDecorations { get; set; } = false;
|
public bool HideFailedDecorations { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>File extension of the default output file name, without the dot (e.g. "mkv", "mp4"); selects the container.</summary>
|
/// <summary>File extension of the default output file name, without the dot (e.g. "mkv", "mp4"); selects the container.</summary>
|
||||||
public string FileExtension { get; set; } = "mkv";
|
public string FileExtension { get; set; } = "mkv";
|
||||||
|
|
||||||
/// <summary>Color of the fire (red) planet during the render; null keeps the user's setting. Serialized as "#RRGGBBAA".</summary>
|
/// <summary>Color of the fire (red) planet during the render; null keeps the user's setting. Serialized as "#RRGGBBAA".</summary>
|
||||||
[JsonConverter(typeof(ColorJsonConverter))]
|
[JsonConverter(typeof(ColorJsonConverter))]
|
||||||
public Color? firePlanetColor = null;
|
public Color? firePlanetColor = null;
|
||||||
|
|
||||||
/// <summary>Color of the ice (blue) planet during the render; null keeps the user's setting. Serialized as "#RRGGBBAA".</summary>
|
/// <summary>Color of the ice (blue) planet during the render; null keeps the user's setting. Serialized as "#RRGGBBAA".</summary>
|
||||||
[JsonConverter(typeof(ColorJsonConverter))]
|
[JsonConverter(typeof(ColorJsonConverter))]
|
||||||
public Color? icePlanetColor = null;
|
public Color? icePlanetColor = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Color of the third (wind, planetGreen) planet during the render (PlanetarySystemPatch); null keeps the game's color.
|
/// Color of the third (wind, planetGreen) planet during the render (PlanetarySystemPatch); null keeps the game's color.
|
||||||
/// Serialized as "#RRGGBBAA".
|
/// Serialized as "#RRGGBBAA".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonConverter(typeof(ColorJsonConverter))]
|
[JsonConverter(typeof(ColorJsonConverter))]
|
||||||
public Color? windPlanetColor = null;
|
public Color? windPlanetColor = null;
|
||||||
|
|
||||||
/// <summary>Copies every value of <paramref name="source"/>; does nothing when it is null.</summary>
|
/// <summary>Copies every value of <paramref name="source"/>; does nothing when it is null.</summary>
|
||||||
public void CopyFrom(AdvancedConfig? source)
|
public void CopyFrom(AdvancedConfig? source)
|
||||||
{
|
{
|
||||||
if (source == null) return;
|
if (source == null) return;
|
||||||
RandomSeed = source.RandomSeed;
|
RandomSeed = source.RandomSeed;
|
||||||
ProcessAudio = source.ProcessAudio;
|
ProcessAudio = source.ProcessAudio;
|
||||||
NonTile = source.NonTile;
|
NonTile = source.NonTile;
|
||||||
HighResBloomCorrection = source.HighResBloomCorrection;
|
HighResBloomCorrection = source.HighResBloomCorrection;
|
||||||
FixCustomFrameRate = source.FixCustomFrameRate;
|
FixCustomFrameRate = source.FixCustomFrameRate;
|
||||||
DisableTileCulling = source.DisableTileCulling;
|
DisableTileCulling = source.DisableTileCulling;
|
||||||
HideFailedDecorations = source.HideFailedDecorations;
|
HideFailedDecorations = source.HideFailedDecorations;
|
||||||
FileExtension = source.FileExtension;
|
FileExtension = source.FileExtension;
|
||||||
firePlanetColor = source.firePlanetColor;
|
firePlanetColor = source.firePlanetColor;
|
||||||
icePlanetColor = source.icePlanetColor;
|
icePlanetColor = source.icePlanetColor;
|
||||||
windPlanetColor = source.windPlanetColor;
|
windPlanetColor = source.windPlanetColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Returns a copy of this object.</summary>
|
/// <summary>Returns a copy of this object.</summary>
|
||||||
public AdvancedConfig Clone()
|
public AdvancedConfig Clone()
|
||||||
{
|
{
|
||||||
var clone = new AdvancedConfig();
|
var clone = new AdvancedConfig();
|
||||||
clone.CopyFrom(this);
|
clone.CopyFrom(this);
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Video encoder settings (passed to FFmpegNativeEncoder.EncoderSettings).</summary>
|
/// <summary>Video encoder settings (passed to FFmpegNativeEncoder.EncoderSettings).</summary>
|
||||||
public class VideoEncodingConfig
|
public class VideoEncodingConfig
|
||||||
{
|
{
|
||||||
/// <summary>Video codec (default H.264). Also selects the audio codec (CodecUtil.AudioCodecMatch).</summary>
|
/// <summary>Video codec (default H.264). Also selects the audio codec (CodecUtil.AudioCodecMatch).</summary>
|
||||||
public Codec Codec { get; set; } = Codec.H264;
|
public Codec Codec { get; set; } = Codec.H264;
|
||||||
|
|
||||||
/// <summary>Bitrate control mode (default CBR).</summary>
|
/// <summary>Bitrate control mode (default CBR).</summary>
|
||||||
public RateControlMode RateControlMode { get; set; } = RateControlMode.CBR;
|
public RateControlMode RateControlMode { get; set; } = RateControlMode.CBR;
|
||||||
|
|
||||||
/// <summary>Target video bitrate in kbps for CBR and VBR (default 30000 = 30 Mbps).</summary>
|
/// <summary>Target video bitrate in kbps for CBR and VBR (default 30000 = 30 Mbps).</summary>
|
||||||
public int Bitrate { get; set; } = 30000;
|
public int Bitrate { get; set; } = 30000;
|
||||||
|
|
||||||
/// <summary>Peak video bitrate in kbps for VBR, used when larger than Bitrate (otherwise 1.5 × Bitrate). Default 50000.</summary>
|
/// <summary>Peak video bitrate in kbps for VBR, used when larger than Bitrate (otherwise 1.5 × Bitrate). Default 50000.</summary>
|
||||||
public int MaxBitrate { get; set; } = 50000;
|
public int MaxBitrate { get; set; } = 50000;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Quality value for CQP: lower is higher quality. Clamped to the range of the selected encoder; a negative value
|
/// Quality value for CQP: lower is higher quality. Clamped to the range of the selected encoder; a negative value
|
||||||
/// selects 18. Default 18.
|
/// selects 18. Default 18.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// ReSharper disable once InconsistentNaming
|
// ReSharper disable once InconsistentNaming
|
||||||
public int QP { get; set; } = 18;
|
public int QP { get; set; } = 18;
|
||||||
|
|
||||||
/// <summary>Keyframe interval in seconds (GOP length = round(effective video FPS × interval) frames, at least 1). Default 2.</summary>
|
/// <summary>Keyframe interval in seconds (GOP length = round(effective video FPS × interval) frames, at least 1). Default 2.</summary>
|
||||||
public double KeyframeInterval { get; set; } = 2.0;
|
public double KeyframeInterval { get; set; } = 2.0;
|
||||||
|
|
||||||
/// <summary>When true, only software (CPU) encoders are tried; hardware encoders are skipped.</summary>
|
/// <summary>When true, only software (CPU) encoders are tried; hardware encoders are skipped.</summary>
|
||||||
public bool ForceSoftwareEncoder { get; set; }
|
public bool ForceSoftwareEncoder { get; set; }
|
||||||
|
|
||||||
/// <summary>Copies every value of <paramref name="source"/>; does nothing when it is null.</summary>
|
/// <summary>Copies every value of <paramref name="source"/>; does nothing when it is null.</summary>
|
||||||
public void CopyFrom(VideoEncodingConfig? source)
|
public void CopyFrom(VideoEncodingConfig? source)
|
||||||
{
|
{
|
||||||
if (source == null) return;
|
if (source == null) return;
|
||||||
Codec = source.Codec;
|
Codec = source.Codec;
|
||||||
RateControlMode = source.RateControlMode;
|
RateControlMode = source.RateControlMode;
|
||||||
Bitrate = source.Bitrate;
|
Bitrate = source.Bitrate;
|
||||||
MaxBitrate = source.MaxBitrate;
|
MaxBitrate = source.MaxBitrate;
|
||||||
QP = source.QP;
|
QP = source.QP;
|
||||||
KeyframeInterval = source.KeyframeInterval;
|
KeyframeInterval = source.KeyframeInterval;
|
||||||
ForceSoftwareEncoder = source.ForceSoftwareEncoder;
|
ForceSoftwareEncoder = source.ForceSoftwareEncoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Returns a copy of this object.</summary>
|
/// <summary>Returns a copy of this object.</summary>
|
||||||
public VideoEncodingConfig Clone()
|
public VideoEncodingConfig Clone()
|
||||||
{
|
{
|
||||||
var clone = new VideoEncodingConfig();
|
var clone = new VideoEncodingConfig();
|
||||||
clone.CopyFrom(this);
|
clone.CopyFrom(this);
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Audio rendering and encoder settings. Non-positive values of the numeric settings read back as their defaults
|
/// Audio rendering and encoder settings. Non-positive values of the numeric settings read back as their defaults
|
||||||
/// (48000 Hz, 2 channels, 256000 bps).
|
/// (48000 Hz, 2 channels, 256000 bps).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AudioEncodingConfig
|
public class AudioEncodingConfig
|
||||||
{
|
{
|
||||||
private int _audioSampleRate = 48000;
|
private int _audioSampleRate = 48000;
|
||||||
private int _audioChannels = 2;
|
private int _audioChannels = 2;
|
||||||
private int _audioBitrate = 256000;
|
private int _audioBitrate = 256000;
|
||||||
|
|
||||||
/// <summary>When true, the song and sound effects are mixed offline and encoded as an audio stream. Default true.</summary>
|
/// <summary>When true, the song and sound effects are mixed offline and encoded as an audio stream. Default true.</summary>
|
||||||
public bool RenderAudio { get; set; } = true;
|
public bool RenderAudio { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Output sample rate in Hz (default 48000). A rate the audio codec does not support in the mod
|
/// Output sample rate in Hz (default 48000). A rate the audio codec does not support in the mod
|
||||||
/// (CodecUtil.AvailableSampleRate) is replaced with 48000 when the render starts.
|
/// (CodecUtil.AvailableSampleRate) is replaced with 48000 when the render starts.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int AudioSampleRate
|
public int AudioSampleRate
|
||||||
{
|
{
|
||||||
get => _audioSampleRate <= 0 ? 48000 : _audioSampleRate;
|
get => _audioSampleRate <= 0 ? 48000 : _audioSampleRate;
|
||||||
set => _audioSampleRate = value <= 0 ? 48000 : value;
|
set => _audioSampleRate = value <= 0 ? 48000 : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Number of output audio channels (default 2).</summary>
|
/// <summary>Number of output audio channels (default 2).</summary>
|
||||||
public int AudioChannels
|
public int AudioChannels
|
||||||
{
|
{
|
||||||
get => _audioChannels <= 0 ? 2 : _audioChannels;
|
get => _audioChannels <= 0 ? 2 : _audioChannels;
|
||||||
set => _audioChannels = value <= 0 ? 2 : value;
|
set => _audioChannels = value <= 0 ? 2 : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Audio bitrate in bits per second (default 256000 = 256 kbps). Unit differs from the video bitrate (kbps).</summary>
|
/// <summary>Audio bitrate in bits per second (default 256000 = 256 kbps). Unit differs from the video bitrate (kbps).</summary>
|
||||||
public int AudioBitrate
|
public int AudioBitrate
|
||||||
{
|
{
|
||||||
get => _audioBitrate <= 0 ? 256000 : _audioBitrate;
|
get => _audioBitrate <= 0 ? 256000 : _audioBitrate;
|
||||||
set => _audioBitrate = value <= 0 ? 256000 : value;
|
set => _audioBitrate = value <= 0 ? 256000 : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Copies every value of <paramref name="source"/>; does nothing when it is null.</summary>
|
/// <summary>Copies every value of <paramref name="source"/>; does nothing when it is null.</summary>
|
||||||
public void CopyFrom(AudioEncodingConfig? source)
|
public void CopyFrom(AudioEncodingConfig? source)
|
||||||
{
|
{
|
||||||
if (source == null) return;
|
if (source == null) return;
|
||||||
RenderAudio = source.RenderAudio;
|
RenderAudio = source.RenderAudio;
|
||||||
AudioSampleRate = source.AudioSampleRate;
|
AudioSampleRate = source.AudioSampleRate;
|
||||||
AudioChannels = source.AudioChannels;
|
AudioChannels = source.AudioChannels;
|
||||||
AudioBitrate = source.AudioBitrate;
|
AudioBitrate = source.AudioBitrate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Returns a copy of this object.</summary>
|
/// <summary>Returns a copy of this object.</summary>
|
||||||
public AudioEncodingConfig Clone()
|
public AudioEncodingConfig Clone()
|
||||||
{
|
{
|
||||||
var clone = new AudioEncodingConfig();
|
var clone = new AudioEncodingConfig();
|
||||||
clone.CopyFrom(this);
|
clone.CopyFrom(this);
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
}␍
|
}
|
||||||
@@ -807,7 +807,7 @@ internal static class RenderConfigWindow
|
|||||||
_disableTileCullingToggle = CreateToggleField(
|
_disableTileCullingToggle = CreateToggleField(
|
||||||
ctx, CreateFieldSlot(advLeft),
|
ctx, CreateFieldSlot(advLeft),
|
||||||
labelKey: "",
|
labelKey: "",
|
||||||
defaultValue: true,
|
defaultValue: false,
|
||||||
value: config.AdvancedConfig.DisableTileCulling,
|
value: config.AdvancedConfig.DisableTileCulling,
|
||||||
toggleTextKey: "ui.render_config.disable_tile_culling",
|
toggleTextKey: "ui.render_config.disable_tile_culling",
|
||||||
id: "toggle_disable_tile_culling",
|
id: "toggle_disable_tile_culling",
|
||||||
|
|||||||
Reference in new issue
Block a user