Skip to content

Commit

Permalink
update offset for 2.9.2, update nuget packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Kxnrl committed Aug 5, 2021
1 parent aeeacda commit 3df1028
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 18 deletions.
14 changes: 11 additions & 3 deletions NetEaseMusic-DiscordRPC/App.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="NetEaseMusic_DiscordRPC.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<userSettings>
<NetEaseMusic_DiscordRPC.Properties.Settings>
Expand All @@ -15,4 +15,12 @@
</setting>
</NetEaseMusic_DiscordRPC.Properties.Settings>
</userSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
6 changes: 4 additions & 2 deletions NetEaseMusic-DiscordRPC/MemoryUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public static void LoadMemory(int pid, ref double rate, ref double lens)
// offset 2.7.3 -> 0x8BDAD0
// offset 2.7.6 -> 0x8BEAD8
// offset 2.8.0 -> 0x939B50
if (!ReadProcessMemory(EntryPoint, BaseAddress + 0x939B50, buffer, sizeof(double), IntPtr.Zero))
// offset 2.9.2 -> 0x93EB38
if (!ReadProcessMemory(EntryPoint, BaseAddress + 0x93EB38, buffer, sizeof(double), IntPtr.Zero))
{
Debug.Print($"Failed to load memory at 0x{(BaseAddress + 0x939B48).ToString("X")}");
return;
Expand All @@ -59,7 +60,8 @@ public static void LoadMemory(int pid, ref double rate, ref double lens)
// offset 2.7.3 -> 0x8DEB98
// offset 2.7.6 -> 0x8DFC080
// offset 2.8.0 -> 0x961D98
if (!ReadProcessMemory(EntryPoint, BaseAddress + 0x961D98, buffer, sizeof(double), IntPtr.Zero))
// offset 2.9.2 -> 0x967DA8
if (!ReadProcessMemory(EntryPoint, BaseAddress + 0x967DA8, buffer, sizeof(double), IntPtr.Zero))
{
Debug.Print($"Failed to load memory at 0x{(BaseAddress + 0x961DA8).ToString("X")}");
return;
Expand Down
8 changes: 4 additions & 4 deletions NetEaseMusic-DiscordRPC/NetEaseMusic-DiscordRPC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
<StartupObject>NetEaseMusic_DiscordRPC.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="DiscordRPC, Version=1.0.150.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DiscordRichPresence.1.0.150\lib\net35\DiscordRPC.dll</HintPath>
<Reference Include="DiscordRPC, Version=1.0.175.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DiscordRichPresence.1.0.175\lib\net35\DiscordRPC.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
10 changes: 5 additions & 5 deletions NetEaseMusic-DiscordRPC/Program.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Windows.Forms;
using System.Threading;
using DiscordRPC;
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using DiscordRPC;
using System.Windows.Forms;

namespace NetEaseMusic_DiscordRPC
{
Expand Down Expand Up @@ -107,7 +107,7 @@ private static void Main()

Debug.Print($"playerState -> {playerState} | Equals {maxSongLens} | {lastLens}");

update:
update:
// update
#if DEBUG
if (!playerState)
Expand Down
4 changes: 2 additions & 2 deletions NetEaseMusic-DiscordRPC/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.2")]
[assembly: AssemblyFileVersion("2.0.2")]
[assembly: AssemblyVersion("2.0.3")]
[assembly: AssemblyFileVersion("2.0.3")]
4 changes: 2 additions & 2 deletions NetEaseMusic-DiscordRPC/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DiscordRichPresence" version="1.0.150" targetFramework="net48" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
<package id="DiscordRichPresence" version="1.0.175" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
</packages>

0 comments on commit 3df1028

Please sign in to comment.