SHA256
Fix Preset Save
This commit is contained in:
5 files changed
+79
-70
No files matched your search
@@ -327,7 +327,7 @@ namespace ADOFAIRenderer.UI
|
||||
AudioBitrate = config.AudioConfig.AudioBitrate
|
||||
};
|
||||
|
||||
if (_root.Contains(_audioEncodingConfigContainer))
|
||||
if (_audioEncodingConfigContainer != null && _root.Contains(_audioEncodingConfigContainer))
|
||||
{
|
||||
_root.Remove(_audioEncodingConfigContainer);
|
||||
}
|
||||
@@ -372,9 +372,14 @@ namespace ADOFAIRenderer.UI
|
||||
// 3. 샘플 레이트 로우
|
||||
var sampleRateRow = CreateRow();
|
||||
var sampleRateLabel = CreateFormLabel("샘플 레이트(Hz)");
|
||||
var sampleRateStr = tempAudioConfig.AudioSampleRate.ToString();
|
||||
if (sampleRateStr != "44100" && sampleRateStr != "48000")
|
||||
{
|
||||
sampleRateStr = "44100";
|
||||
}
|
||||
var sampleRateDropdown = new DropdownField(
|
||||
new List<string> { "44100", "48000" },
|
||||
tempAudioConfig.AudioSampleRate.ToString()
|
||||
sampleRateStr
|
||||
);
|
||||
sampleRateRow.Add(sampleRateLabel);
|
||||
sampleRateRow.Add(sampleRateDropdown);
|
||||
@@ -498,6 +503,7 @@ namespace ADOFAIRenderer.UI
|
||||
config.RandomSeed = null;
|
||||
|
||||
RenderManager.Instance.Configuration.VideoConfig ??= GenerateEncodingConfig();
|
||||
RenderManager.Instance.Configuration.AudioConfig ??= GenerateAudioEncodingConfig();
|
||||
|
||||
RenderManager.Instance.SetupCaptureDirectory();
|
||||
RenderManager.Instance.SetupGameScene();
|
||||
@@ -569,6 +575,9 @@ namespace ADOFAIRenderer.UI
|
||||
}
|
||||
}
|
||||
|
||||
config.VideoConfig ??= GenerateEncodingConfig();
|
||||
config.AudioConfig ??= GenerateAudioEncodingConfig();
|
||||
|
||||
RenderManager.Instance.Configuration = config;
|
||||
}
|
||||
|
||||
@@ -921,6 +930,7 @@ namespace ADOFAIRenderer.UI
|
||||
}
|
||||
|
||||
currentConfig.VideoConfig = RenderManager.Instance.Configuration.VideoConfig ?? GenerateEncodingConfig();
|
||||
currentConfig.AudioConfig = RenderManager.Instance.Configuration.AudioConfig ?? GenerateAudioEncodingConfig();
|
||||
|
||||
PresetManager.SavePreset(presetName, currentConfig);
|
||||
nameField.value = string.Empty;
|
||||
|
||||
Reference in new issue
Block a user