Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rassi0429 committed Jun 11, 2022
1 parent bd3c283 commit 72949a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions SaveExif/SaveExif.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
extern alias lib1;
using FrooxEngine;
using FrooxEngine;
using HarmonyLib;
using NeosModLoader;
using System;
Expand Down Expand Up @@ -29,7 +28,7 @@ public override void OnEngineInit()
harmony.PatchAll();
}

[HarmonyPatch(typeof(lib1::WindowsPlatformConnector), "NotifyOfScreenshot", new Type[] { typeof(World), typeof(string), typeof(ScreenshotType), typeof(DateTime) })]
[HarmonyPatch(typeof(WindowsPlatformConnector), "NotifyOfScreenshot", new Type[] { typeof(World), typeof(string), typeof(ScreenshotType), typeof(DateTime) })]
class Patch
{

Expand All @@ -46,7 +45,7 @@ private static void SetProperty(ref System.Drawing.Imaging.PropertyItem prop, in
prop.Len = iLen;
}

static bool Prefix(bool ___keepOriginalScreenshotFormat, lib1::WindowsPlatformConnector __instance, World world, string file, ScreenshotType type, DateTime timestamp)
static bool Prefix(bool ___keepOriginalScreenshotFormat, WindowsPlatformConnector __instance, World world, string file, ScreenshotType type, DateTime timestamp)
{
__instance.Engine.GlobalCoroutineManager.StartTask((Func<Task>)(async () =>
{
Expand All @@ -62,7 +61,7 @@ static bool Prefix(bool ___keepOriginalScreenshotFormat, lib1::WindowsPlatformCo
if (fileType != null)
extension = "." + fileType.Extension;
}
await lib1::WindowsPlatformConnector.ScreenshotSemaphore.WaitAsync().ConfigureAwait(false);
await WindowsPlatformConnector.ScreenshotSemaphore.WaitAsync().ConfigureAwait(false);
try
{
int num = 1;
Expand Down Expand Up @@ -130,7 +129,8 @@ static bool Prefix(bool ___keepOriginalScreenshotFormat, lib1::WindowsPlatformCo
$"\"neosVersion\":\"{neosVersion}\",\n" +
$"\"takeUserName\":\"{takeUserName}\",\n" +
$"\"presentUserIdArray\":[\"{String.Join("\",\"", presentUserIdArray)}\"],\n" +
$"\"presentUserNameArray\":[\"{String.Join("\",\"", presentUserNameArray)}\"]}}";
$"\"presentUserNameArray\":[\"{String.Join("\",\"", presentUserNameArray)}\"],\n" +
$"\"version\":\"1.0.0\"}}";

byte[] header = { 0x55, 0x4E, 0x49, 0x43, 0x4F, 0x44, 0x45, 0x0 };
byte[] content = System.Text.Encoding.Unicode.GetBytes(str);
Expand Down Expand Up @@ -173,7 +173,7 @@ static bool Prefix(bool ___keepOriginalScreenshotFormat, lib1::WindowsPlatformCo
}
finally
{
lib1::WindowsPlatformConnector.ScreenshotSemaphore.Release();
WindowsPlatformConnector.ScreenshotSemaphore.Release();
}
}));

Expand Down
2 changes: 1 addition & 1 deletion SaveExif/SaveExif.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\NeosVR\Neos_Data\Managed\Assembly-CSharp.dll</HintPath>
<Aliases>lib1</Aliases>
<Aliases>global</Aliases>
</Reference>
<Reference Include="BaseX">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\NeosVR\Neos_Data\Managed\BaseX.dll</HintPath>
Expand Down

0 comments on commit 72949a2

Please sign in to comment.