SHA256
forked from ADOFAIEditorForum/ADOFAIRenderer
Refactor GetOutputExtension
This commit is contained in:
2 files changed
+5
-6
No files matched your search
@@ -384,7 +384,7 @@ namespace ADOFAIRenderer.Core
|
||||
|
||||
private IEnumerator SetupPlay()
|
||||
{
|
||||
if (Configuration.RenderAudio && GetOutputExtension() != ".mp4")
|
||||
if (Configuration.RenderAudio && GetOutputExtension(Configuration.Codec) != ".mp4")
|
||||
{
|
||||
Configuration.AudioSampleRate = 48000;
|
||||
}
|
||||
@@ -468,7 +468,7 @@ namespace ADOFAIRenderer.Core
|
||||
var videoFPS = Configuration.VideoFPS;
|
||||
|
||||
var selectedCodec = Configuration.Codec;
|
||||
var ext = GetOutputExtension();
|
||||
var ext = GetOutputExtension(selectedCodec);
|
||||
|
||||
var startTime = DateTime.Now;
|
||||
var fileName = startTime.ToString("yyyy-MM-dd HH-mm-ss") + ext;
|
||||
@@ -803,10 +803,9 @@ namespace ADOFAIRenderer.Core
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
private string GetOutputExtension()
|
||||
private string GetOutputExtension(Codec codec)
|
||||
{
|
||||
var selectedCodec = Configuration.Codec;
|
||||
return selectedCodec switch
|
||||
return codec switch
|
||||
{
|
||||
Codec.AV1 or Codec.VP9 => ".webm",
|
||||
Codec.VVC => ".mkv",
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ using MelonLoader.Utils;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
[assembly: MelonInfo(typeof(RenderMod), "ADOFAI Renderer", "0.2.4-BETA", "ADOFAI Editor Forum")]
|
||||
[assembly: MelonInfo(typeof(RenderMod), "ADOFAI Renderer", "0.0.6-INDEV-AUDIO", "ADOFAI Editor Forum")]
|
||||
[assembly: MelonGame("7th Beat Games", "A Dance of Fire and Ice")]
|
||||
|
||||
namespace ADOFAIRenderer
|
||||
|
||||
Reference in new issue
Block a user