Skip to content

Commit be19752

Browse files
committed
Refactor RedirectInternalLogs -> MirrorInternalLogs
1 parent 1628b52 commit be19752

File tree

12 files changed

+26
-26
lines changed

12 files changed

+26
-26
lines changed

BepInEx.Debug.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoProfilerLoader", "src\S
1717
EndProject
1818
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoProfilerController", "src\simpleprofiler\MonoProfilerController\MonoProfilerController.csproj", "{E643A810-00A8-4B6F-83FC-B8631257EB43}"
1919
EndProject
20-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedirectInternalLogs", "src\RedirectInternalLogs\RedirectInternalLogs.csproj", "{29571930-F2E9-45DC-BB65-5B60C2B16850}"
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MirrorInternalLogs", "src\MirrorInternalLogs\MirrorInternalLogs.csproj", "{29571930-F2E9-45DC-BB65-5B60C2B16850}"
2121
EndProject
2222
Global
2323
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/RedirectInternalLogs/InternalUnityLogger.cs renamed to src/MirrorInternalLogs/InternalUnityLogger.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using System.IO;
3-
using RedirectInternalLogs.Util;
3+
using MirrorInternalLogs.Util;
44

5-
namespace RedirectInternalLogs
5+
namespace MirrorInternalLogs
66
{
77
public enum InternalLogLevel
88
{

src/RedirectInternalLogs/RedirectInternalLogs.csproj renamed to src/MirrorInternalLogs/MirrorInternalLogs.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<ProjectGuid>{29571930-F2E9-45DC-BB65-5B60C2B16850}</ProjectGuid>
88
<OutputType>Library</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>RedirectInternalLogs</RootNamespace>
11-
<AssemblyName>RedirectInternalLogs</AssemblyName>
10+
<RootNamespace>MirrorInternalLogs</RootNamespace>
11+
<AssemblyName>MirrorInternalLogs</AssemblyName>
1212
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
</PropertyGroup>
@@ -72,7 +72,7 @@
7272
<Compile Include="Platforms\IPlatformPatcher.cs" />
7373
<Compile Include="Platforms\X64Patcher.cs" />
7474
<Compile Include="Platforms\X86Patcher.cs" />
75-
<Compile Include="RedirectInternalLogsPatcher.cs" />
75+
<Compile Include="MirrorInternalLogsPatcher.cs" />
7676
<Compile Include="Properties\AssemblyInfo.cs" />
7777
<Compile Include="Util\BytePattern.cs" />
7878
<Compile Include="Util\LibcHelper.cs" />

src/RedirectInternalLogs/RedirectInternalLogsPatcher.cs renamed to src/MirrorInternalLogs/MirrorInternalLogsPatcher.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
using BepInEx;
88
using BepInEx.Configuration;
99
using BepInEx.Logging;
10+
using MirrorInternalLogs.Platforms;
11+
using MirrorInternalLogs.Util;
1012
using Mono.Cecil;
11-
using RedirectInternalLogs.Platforms;
12-
using RedirectInternalLogs.Util;
1313

14-
namespace RedirectInternalLogs
14+
namespace MirrorInternalLogs
1515
{
16-
internal static class RedirectInternalLogsPatcher
16+
internal static class MirrorInternalLogsPatcher
1717
{
18-
internal static ManualLogSource Logger = BepInEx.Logging.Logger.CreateLogSource("RedirectInternalLogs");
18+
internal static ManualLogSource Logger = BepInEx.Logging.Logger.CreateLogSource("MirrorInternalLogs");
1919

2020
private static readonly ConfigFile Config =
21-
new ConfigFile(Path.Combine(Paths.ConfigPath, "RedirectInternalLogs.cfg"), true);
21+
new ConfigFile(Path.Combine(Paths.ConfigPath, "MirrorInternalLogs.cfg"), true);
2222

2323
private static IPlatformPatcher patcher;
2424
private static StreamWriter writer;

src/RedirectInternalLogs/Platforms/IPlatformPatcher.cs renamed to src/MirrorInternalLogs/Platforms/IPlatformPatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace RedirectInternalLogs.Platforms
3+
namespace MirrorInternalLogs.Platforms
44
{
55
internal interface IPlatformPatcher
66
{

src/RedirectInternalLogs/Platforms/X64Patcher.cs renamed to src/MirrorInternalLogs/Platforms/X64Patcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Runtime.InteropServices;
3+
using MirrorInternalLogs.Util;
34
using MonoMod.RuntimeDetour;
4-
using RedirectInternalLogs.Util;
55

6-
namespace RedirectInternalLogs.Platforms
6+
namespace MirrorInternalLogs.Platforms
77
{
88
internal class X64Patcher : X86Patcher
99
{

src/RedirectInternalLogs/Platforms/X86Patcher.cs renamed to src/MirrorInternalLogs/Platforms/X86Patcher.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System;
22
using System.Linq;
33
using System.Runtime.InteropServices;
4+
using MirrorInternalLogs.Util;
45
using MonoMod.RuntimeDetour;
5-
using RedirectInternalLogs.Util;
66

7-
namespace RedirectInternalLogs.Platforms
7+
namespace MirrorInternalLogs.Platforms
88
{
99
internal class X86Patcher : IPlatformPatcher
1010
{
@@ -65,18 +65,18 @@ private unsafe IntPtr FindMatch(IntPtr start, int maxSize)
6565
.FirstOrDefault(m => m.res >= 0);
6666
if (match == null)
6767
{
68-
RedirectInternalLogsPatcher.Logger.LogWarning(
68+
MirrorInternalLogsPatcher.Logger.LogWarning(
6969
"No match found, cannot hook logging! Please report Unity version or game name to the developer!");
7070
return IntPtr.Zero;
7171
}
7272

7373
var ptr = (byte*) start.ToPointer();
74-
RedirectInternalLogsPatcher.Logger.LogDebug($"Found at {match.res:X} ({start.ToInt64() + match.res:X})");
74+
MirrorInternalLogsPatcher.Logger.LogDebug($"Found at {match.res:X} ({start.ToInt64() + match.res:X})");
7575
var offset = *(int*) (ptr + match.res + match.p.Length);
7676
var jmpRva = unchecked((uint) (match.res + match.p.Length + sizeof(int)) + offset);
7777
var addr = start.ToInt64() + jmpRva;
78-
RedirectInternalLogsPatcher.Logger.LogDebug($"Parsed offset: {offset:X}");
79-
RedirectInternalLogsPatcher.Logger.LogDebug(
78+
MirrorInternalLogsPatcher.Logger.LogDebug($"Parsed offset: {offset:X}");
79+
MirrorInternalLogsPatcher.Logger.LogDebug(
8080
$"Jump RVA: {jmpRva:X}, memory address: {addr:X} (image base: {start.ToInt64():X})");
8181
return new IntPtr(addr);
8282
}

src/RedirectInternalLogs/Properties/AssemblyInfo.cs renamed to src/MirrorInternalLogs/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
// General Information about an assembly is controlled through the following
55
// set of attributes. Change these attribute values to modify the information
66
// associated with an assembly.
7-
[assembly: AssemblyTitle("RedirectInternalLogs")]
7+
[assembly: AssemblyTitle("MirrorInternalLogs")]
88
[assembly: AssemblyDescription("")]
99
[assembly: AssemblyConfiguration("")]
1010
[assembly: AssemblyCompany("")]
11-
[assembly: AssemblyProduct("RedirectInternalLogs")]
11+
[assembly: AssemblyProduct("MirrorInternalLogs")]
1212
[assembly: AssemblyCopyright("Copyright © 2020")]
1313
[assembly: AssemblyTrademark("")]
1414
[assembly: AssemblyCulture("")]

src/RedirectInternalLogs/Util/BytePattern.cs renamed to src/MirrorInternalLogs/Util/BytePattern.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Globalization;
33
using System.Linq;
44

5-
namespace RedirectInternalLogs.Util
5+
namespace MirrorInternalLogs.Util
66
{
77
internal class BytePattern
88
{

src/RedirectInternalLogs/Util/LibcHelper.cs renamed to src/MirrorInternalLogs/Util/LibcHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text;
55
using MonoMod.Utils;
66

7-
namespace RedirectInternalLogs.Util
7+
namespace MirrorInternalLogs.Util
88
{
99
internal static class LibcHelper
1010
{

0 commit comments

Comments
 (0)