SHA256
Add Fix Custom FPS Render Timing Option
This commit is contained in:
6 files changed
+157
-1
No files matched your search
@@ -140,6 +140,9 @@ internal static class RenderConfigWindow
|
||||
private static O5Toggle? _processAudioToggle;
|
||||
private static O5Toggle? _nonTileToggle;
|
||||
private static O5Toggle? _highResBloomCorrectionToggle;
|
||||
// === [MARKER: FIX_SET_FRAMERATE_BUG START] ===
|
||||
private static O5Toggle? _fixCustomFrameRateToggle;
|
||||
// === [MARKER: FIX_SET_FRAMERATE_BUG END] ===
|
||||
|
||||
// Planet color overrides: the toggle enables the override, the picker holds the color. A disabled toggle stores
|
||||
// null in AdvancedConfig (no override is applied by PersistencePatch) and blocks the picker.
|
||||
@@ -791,6 +794,24 @@ internal static class RenderConfigWindow
|
||||
generateLabel: false
|
||||
);
|
||||
|
||||
// === [MARKER: FIX_SET_FRAMERATE_BUG START] ===
|
||||
// Fix SetFramerate Render Timing (AdvancedConfig.FixCustomFrameRate): defers manual camera rendering to frame end
|
||||
_fixCustomFrameRateToggle = CreateToggleField(
|
||||
ctx, CreateFieldSlot(advRight),
|
||||
labelKey: "",
|
||||
defaultValue: true,
|
||||
value: config.AdvancedConfig.FixCustomFrameRate,
|
||||
toggleTextKey: "ui.render_config.fix_custom_frame_rate",
|
||||
id: "toggle_fix_custom_frame_rate",
|
||||
onChanged: val =>
|
||||
{
|
||||
config.AdvancedConfig.FixCustomFrameRate = val;
|
||||
MarkConfigModified();
|
||||
},
|
||||
generateLabel: false
|
||||
);
|
||||
// === [MARKER: FIX_SET_FRAMERATE_BUG END] ===
|
||||
|
||||
// 7-1. Planet Color Settings (Optional).
|
||||
// For each planet: the toggle turns the override on/off (off stores null and blocks/collapses the picker);
|
||||
// the picker writes its color into the config only while the toggle is on.
|
||||
@@ -1000,6 +1021,9 @@ internal static class RenderConfigWindow
|
||||
_processAudioToggle?.Set(config.AdvancedConfig.ProcessAudio, false);
|
||||
_nonTileToggle?.Set(config.AdvancedConfig.NonTile, false);
|
||||
_highResBloomCorrectionToggle?.Set(config.AdvancedConfig.HighResBloomCorrection, false);
|
||||
// === [MARKER: FIX_SET_FRAMERATE_BUG START] ===
|
||||
_fixCustomFrameRateToggle?.Set(config.AdvancedConfig.FixCustomFrameRate, false);
|
||||
// === [MARKER: FIX_SET_FRAMERATE_BUG END] ===
|
||||
|
||||
// Planet colors: toggle on when an override is stored; the picker shows the stored color or the default and is
|
||||
// blocked without an override
|
||||
@@ -1182,6 +1206,9 @@ internal static class RenderConfigWindow
|
||||
if (_processAudioToggle != null) target.AdvancedConfig.ProcessAudio = _processAudioToggle.Value;
|
||||
if (_nonTileToggle != null) target.AdvancedConfig.NonTile = _nonTileToggle.Value;
|
||||
if (_highResBloomCorrectionToggle != null) target.AdvancedConfig.HighResBloomCorrection = _highResBloomCorrectionToggle.Value;
|
||||
// === [MARKER: FIX_SET_FRAMERATE_BUG START] ===
|
||||
if (_fixCustomFrameRateToggle != null) target.AdvancedConfig.FixCustomFrameRate = _fixCustomFrameRateToggle.Value;
|
||||
// === [MARKER: FIX_SET_FRAMERATE_BUG END] ===
|
||||
|
||||
// Planet Colors
|
||||
target.AdvancedConfig.firePlanetColor = (_firePlanetToggle?.Value == true && _firePlanetPicker != null)
|
||||
|
||||
Reference in new issue
Block a user