Skip to content

Commit

Permalink
Update offset for 2.7.6 #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kxnrl committed Feb 21, 2021
1 parent ba8f67c commit f80bd13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions NetEaseMusic-DiscordRPC/MemoryUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,20 @@ public static void LoadMemory(int pid, ref double rate, ref double lens)

// offset 2.7.1 -> 0x8ADA70
// offset 2.7.3 -> 0x8BDAD0
if (!ReadProcessMemory(EntryPoint, BaseAddress + 0x8BDAD0, buffer, sizeof(double), IntPtr.Zero))
// offset 2.7.6 -> 0x8BEAD8
if (!ReadProcessMemory(EntryPoint, BaseAddress + 0x8BEAD8, buffer, sizeof(double), IntPtr.Zero))
{
Debug.Print($"Failed to load memory at 0x{(BaseAddress + 0x8BDAD0).ToString("X")}");
Debug.Print($"Failed to load memory at 0x{(BaseAddress + 0x8BEAD8).ToString("X")}");
return;
}
var current = BitConverter.ToDouble(buffer, 0);

// offset 2.7.1 -> 0x8CDF88
// offset 2.7.3 -> 0x8DEB98
if (!ReadProcessMemory(EntryPoint, BaseAddress + 0x8DEB98, buffer, sizeof(double), IntPtr.Zero))
// offset 2.7.6 -> 0x8DFC08
if (!ReadProcessMemory(EntryPoint, BaseAddress + 0x8DFC08, buffer, sizeof(double), IntPtr.Zero))
{
//Debug.Print($"Failed to load memory at 0x{(BaseAddress + 0x792BEB98).ToString("X")}");
Debug.Print($"Failed to load memory at 0x{(BaseAddress + 0x8DFC08).ToString("X")}");
return;
}
var maxlens = BitConverter.ToDouble(buffer, 0);
Expand Down
2 changes: 1 addition & 1 deletion NetEaseMusic-DiscordRPC/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private static void Main()
#if _DEBUG
if (!playerState)
#else
if (Win32Api.User32.IsFullscreenAppRunning() || Win32Api.User32.IsWhitelistAppRunning() ||
if (/*Win32Api.User32.IsFullscreenAppRunning() || Win32Api.User32.IsWhitelistAppRunning() ||*/
!playerState)
#endif
{
Expand Down

0 comments on commit f80bd13

Please sign in to comment.