SHA256
Remove Useless Render Frame Skip Check
This commit is contained in:
3 files changed
-84
No files matched your search
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using MelonLoader;
|
||||
|
||||
namespace ADOFAIRenderer.Util
|
||||
{
|
||||
internal static class StreamUtil
|
||||
{
|
||||
public static void WriteNativePtrToStream(IntPtr nativePtr, int length, Stream destinationStream)
|
||||
{
|
||||
if (nativePtr == IntPtr.Zero)
|
||||
throw new ArgumentNullException(nameof(nativePtr));
|
||||
if (length <= 0) return;
|
||||
|
||||
unsafe
|
||||
{
|
||||
try
|
||||
{
|
||||
var span = new ReadOnlySpan<byte>((void*)nativePtr, length);
|
||||
destinationStream.Write(span);
|
||||
}
|
||||
catch (IOException err)
|
||||
{
|
||||
Melon<RenderMod>.Logger.Error($"FFmpeg pipe closed unexpectedly: {err.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user