Validate Even Render Resolution Before Starting

This commit is contained in:
copecone committed 2026-10-14 20:20:16 +09:00
1 parent a4dba82729
commit 1fdee67f9d
3 files changed
+10

No files matched your search

+1
View File
@@ -45,6 +45,7 @@
"ui.render_config.random_seed": "Random Seed (Optional)",
"ui.render_config.validation_title": "Invalid Settings",
"ui.render_config.validation_error": "Please check your input values:\n- Width and Height must be integers > 0\n- Render FPS and Video FPS must be > 0\n- Delay After End must be >= 0",
"ui.render_config.validation_even_size": "Render width and height must be even numbers (current: {0} x {1}).",
"ui.render_config.invalid_path": "Output directory path is invalid:\n{0}",
"ui.render_config.planet_colors": "Planet Colors (Optional)",
"ui.render_config.fire_planet": "Fire Planet",
+1
View File
@@ -45,6 +45,7 @@
"ui.render_config.random_seed": "랜덤 시드 (선택 사항)",
"ui.render_config.validation_title": "설정 오류",
"ui.render_config.validation_error": "입력값을 확인해 주세요:\n- 너비와 높이는 0보다 큰 정수여야 합니다.\n- 렌더 FPS와 영상 FPS는 0보다 커야 합니다.\n- 종료 후 대기 시간은 0 이상이어야 합니다.",
"ui.render_config.validation_even_size": "렌더 해상도의 가로와 세로는 짝수여야 해요. (현재: {0} x {1})",
"ui.render_config.invalid_path": "출력 디렉토리 경로가 올바르지 않습니다:\n{0}",
"ui.render_config.planet_colors": "행성 색상 설정 (선택 사항)",
"ui.render_config.fire_planet": "불 행성",
+8
View File
@@ -846,6 +846,14 @@ internal static class RenderConfigWindow
var config = UiConfig;
SyncUItoConfig(config);
// The encoders use 4:2:0 chroma subsampling, which needs an even width and height.
if (config.RenderWidth % 2 != 0 || config.RenderHeight % 2 != 0)
{
ShowValidationError(LocalizationManager.Get(
"ui.render_config.validation_even_size", config.RenderWidth, config.RenderHeight));
return;
}
// Sync Output Directory
if (_outputDirInput != null)
{