Skip to content

Commit 246697b

Browse files
authored
Merge pull request #17 from Milkitic/dev/ortdp2
Update for new memory reader
2 parents 5bba94f + 61c5151 commit 246697b

File tree

79 files changed

+1901
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1901
-284
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup .NET
2323
uses: actions/setup-dotnet@v1
2424
with:
25-
dotnet-version: 7.0.x
25+
dotnet-version: 8.0.x
2626

2727
- name: Restore dependencies
2828
run: |
@@ -38,9 +38,9 @@ jobs:
3838
if: ${{ success() }}
3939
run: |
4040
echo ${{ github.ref }}
41-
dotnet publish KeyAsio.Gui --no-restore --framework net7.0-windows --runtime win-x64 --self-contained --configuration Release --output ci-publish-win64
42-
dotnet publish KeyAsio.Gui --no-restore --framework net7.0-windows --runtime win-x86 --self-contained --configuration Release --output ci-publish-win32
43-
dotnet publish KeyAsio.Gui --no-restore --framework net7.0-windows --configuration Release --output ci-publish
41+
dotnet publish KeyAsio.Gui --no-restore --framework net8.0-windows --runtime win-x64 --self-contained --configuration Release --output ci-publish-win64
42+
dotnet publish KeyAsio.Gui --no-restore --framework net8.0-windows --runtime win-x86 --self-contained --configuration Release --output ci-publish-win32
43+
dotnet publish KeyAsio.Gui --no-restore --framework net8.0-windows --configuration Release --output ci-publish
4444
4545
- name: Confuser
4646
if: ${{ success() }}

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "dependencies/OsuRTDataProviderCore"]
22
path = dependencies/OsuRTDataProviderCore
3-
url = https://github.com/Milkitic/OsuRTDataProviderCore
3+
url = https://github.com/Milkitic/OsuRTDataProviderCore.git
4+
[submodule "dependencies/ProcessMemoryDataFinder"]
5+
path = dependencies/ProcessMemoryDataFinder
6+
url = https://github.com/Milkitic/ProcessMemoryDataFinder.git

KeyAsio.Gui/App.xaml.cs

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
using System.Windows;
1212
using System.Xml;
1313
using System.Xml.Linq;
14-
using KeyAsio.Gui.Configuration;
15-
using KeyAsio.Gui.Realtime;
1614
using KeyAsio.Gui.Utils;
1715
using KeyAsio.Gui.Windows;
16+
using KeyAsio.MemoryReading;
17+
using KeyAsio.MemoryReading.Logging;
18+
using KeyAsio.Shared;
19+
using KeyAsio.Shared.Configuration;
20+
using KeyAsio.Shared.Realtime;
21+
using KeyAsio.Shared.Utils;
1822
using Milki.Extensions.Configuration;
19-
using OsuRTDataProvider;
20-
using OsuRTDataProvider.BeatmapInfo;
21-
using OsuRTDataProvider.Listen;
22-
using OrtdpLogger = OsuRTDataProvider.Logger;
23-
using OrtdpSetting = OsuRTDataProvider.Setting;
23+
using OrtdpLogger = KeyAsio.MemoryReading.Logger;
2424

2525
namespace KeyAsio.Gui;
2626

@@ -171,18 +171,14 @@ private void App_OnStartup(object sender, StartupEventArgs e)
171171
}
172172

173173
OrtdpLogger.SetLoggerFactory(LogUtils.LoggerFactory);
174-
OrtdpSetting.DisableProcessNotFoundInformation = true;
175-
OrtdpSetting.ListenInterval = 3;
176-
var manager = new OsuListenerManager();
177-
manager.OnPlayerChanged += player => RealtimeModeManager.Instance.Username = player;
178-
manager.OnModsChanged += modsInfo => RealtimeModeManager.Instance.PlayMods = modsInfo.Mod;
179-
manager.OnComboChanged += combo => RealtimeModeManager.Instance.Combo = combo;
180-
manager.OnScoreChanged += score => RealtimeModeManager.Instance.Score = score;
181-
manager.OnPlayingTimeUpdated += playTime => RealtimeModeManager.Instance.LastFetchedPlayTime = playTime;
182-
manager.OnBeatmapChanged += beatmap => RealtimeModeManager.Instance.Beatmap = beatmap ?? Beatmap.Empty;
183-
manager.OnStatusChanged += (pre, current) => RealtimeModeManager.Instance.OsuStatus = current;
184-
manager.Start();
185-
RealtimeModeManager.Instance.OsuListenerManager = manager;
174+
MemoryScan.MemoryReadObject.PlayerNameChanged += (_, player) => RealtimeModeManager.Instance.Username = player;
175+
MemoryScan.MemoryReadObject.ModsChanged += (_, mods) => RealtimeModeManager.Instance.PlayMods = mods;
176+
MemoryScan.MemoryReadObject.ComboChanged += (_, combo) => RealtimeModeManager.Instance.Combo = combo;
177+
MemoryScan.MemoryReadObject.ScoreChanged += (_, score) => RealtimeModeManager.Instance.Score = score;
178+
MemoryScan.MemoryReadObject.PlayingTimeChanged += (_, playTime) => RealtimeModeManager.Instance.LastFetchedPlayTime = playTime;
179+
MemoryScan.MemoryReadObject.BeatmapIdentifierChanged += (_, beatmap) => RealtimeModeManager.Instance.Beatmap = beatmap;
180+
MemoryScan.MemoryReadObject.OsuStatusChanged += (pre, current) => RealtimeModeManager.Instance.OsuStatus = current;
181+
MemoryScan.Start(settings.RealtimeOptions.ScanInterval);
186182
SkinManager.Instance.ListenToProcess();
187183
}
188184

KeyAsio.Gui/KeyAsio.Gui.csproj

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net7.0-windows</TargetFramework>
5+
<TargetFramework>net8.0-windows</TargetFramework>
66
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
77
<Nullable>enable</Nullable>
88
<UseWPF>true</UseWPF>
@@ -35,24 +35,19 @@
3535
</ItemGroup>
3636

3737
<ItemGroup>
38-
<PackageReference Include="Coosu.Beatmap" Version="2.3.36" />
3938
<PackageReference Include="HandyControl" Version="3.4.0" />
4039
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
41-
<PackageReference Include="Milki.Extensions.Configuration" Version="0.0.36" />
42-
<PackageReference Include="Milki.Extensions.MixPlayer" Version="0.0.36" />
43-
<PackageReference Include="Milki.Extensions.MouseKeyHook" Version="0.0.36" />
4440
<PackageReference Include="MinVer" Version="4.3.0">
4541
<PrivateAssets>all</PrivateAssets>
4642
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4743
</PackageReference>
48-
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.7" />
4944
<PackageReference Include="Semver" Version="2.3.0" />
50-
<PackageReference Include="YamlDotNet" Version="13.7.1" />
5145
</ItemGroup>
5246

5347
<ItemGroup>
54-
<ProjectReference Include="..\dependencies\OsuRTDataProviderCore\OsuRTDataProvider.csproj" />
48+
<!--<ProjectReference Include="..\dependencies\OsuRTDataProviderCore\OsuRTDataProvider.csproj" />-->
5549
<ProjectReference Include="..\KeyAsio.Sentry\KeyAsio.Sentry.csproj" />
50+
<ProjectReference Include="..\KeyAsio.Shared\KeyAsio.Shared.csproj" />
5651
</ItemGroup>
5752

5853
<ItemGroup>

KeyAsio.Gui/Utils/Updater.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
using System.Text.Json;
99
using System.Threading;
1010
using System.Threading.Tasks;
11-
using OsuRTDataProvider;
11+
using KeyAsio.MemoryReading.Logging;
12+
using KeyAsio.Shared;
1213
using Semver;
1314

1415
namespace KeyAsio.Gui.Utils;

KeyAsio.Gui/Utils/WrapperLoggerFactory.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

KeyAsio.Gui/Windows/DeviceWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using System.Linq;
44
using System.Threading.Tasks;
55
using System.Windows;
6-
using KeyAsio.Gui.Models;
76
using KeyAsio.Gui.UserControls;
7+
using KeyAsio.Shared.Models;
88
using Milki.Extensions.MixPlayer.Devices;
99

1010
namespace KeyAsio.Gui.Windows;

KeyAsio.Gui/Windows/KeyBindWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
using System.Collections.Generic;
33
using System.Collections.ObjectModel;
44
using System.Windows;
5-
using KeyAsio.Gui.Models;
65
using KeyAsio.Gui.UserControls;
6+
using KeyAsio.Shared.Models;
77
using Milki.Extensions.MouseKeyHook;
88

99
namespace KeyAsio.Gui.Windows;

KeyAsio.Gui/Windows/LatencyGuideWindow.xaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
xmlns:gui="clr-namespace:KeyAsio.Gui"
7-
xmlns:local="clr-namespace:KeyAsio.Gui.Windows"
86
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9-
xmlns:models="clr-namespace:KeyAsio.Gui.Models"
7+
xmlns:models="clr-namespace:KeyAsio.Shared.Models;assembly=KeyAsio.Shared"
108
xmlns:userControls="clr-namespace:KeyAsio.Gui.UserControls"
119
Title="Offset Configuration Guide"
1210
Width="450"

KeyAsio.Gui/Windows/LatencyGuideWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Windows;
3-
using KeyAsio.Gui.Models;
43
using KeyAsio.Gui.UserControls;
4+
using KeyAsio.Shared.Models;
55

66
namespace KeyAsio.Gui.Windows;
77

0 commit comments

Comments
 (0)