Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Commit 08e7f25

Browse files
committed
Spring cleaning for full release
1 parent a75dcd6 commit 08e7f25

File tree

3 files changed

+37
-12
lines changed

3 files changed

+37
-12
lines changed

Docs.xml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Outflow.csproj

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<LangVersion>latest</LangVersion>
8+
<DocumentationFile>./Docs.xml</DocumentationFile>
89

9-
<Version>0.0.1.0</Version>
10+
11+
<Version>1.0.0</Version>
1012
<AssemblyVersion>$(Version)</AssemblyVersion>
1113
<Authors>Cyro</Authors>
1214
<Product>Outflow packet manager</Product>
1315
<Description>Mitigate hitching when new users join a session in Resonite</Description>
1416
<Copyright>Copyright (c) 2023 Riley Fields</Copyright>
1517

16-
<DocumentationFile>./Docs.xml</DocumentationFile>
18+
<ReleaseBuild>./ReleaseBuild/</ReleaseBuild>
1719
</PropertyGroup>
1820

1921
<!--This will test for the default Steam installation paths for Resonite on Windows and Linux.-->
@@ -40,23 +42,33 @@
4042
</Reference>
4143
</ItemGroup>
4244

45+
4346
<ItemGroup>
4447
<PackageReference Include="Lib.Harmony" Version="2.2.2.0" />
4548
</ItemGroup>
4649

50+
4751
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
4852
<!--Copy SourceFiles="$(OutDir)$(TargetFileName)" DestinationFolder="./" /-->
49-
<!--Exec Command="C:\Program Files (x86)\Steam\steamapps\common\Resonite\Resonite.exe -Screen -screen-fullscreen 1 -DontAutoOpenCloudHome -CachePath C:\Resonite\Cache -DataPath C:\Resonite\Data -CTAATemporalEdgePower 1.0 -CTAASharpnessEnabled False -CTAAAdaptiveSharpness 0.4 -LoadAssembly Libraries\ResoniteModLoader.dll" /-->
5053
</Target>
5154

55+
5256
<Target Name="MoveBinary" AfterTargets="Publish">
53-
<Copy SourceFiles="$(PublishDir)$(TargetFileName)" DestinationFolder="." />
57+
<Copy SourceFiles="$(PublishDir)$(TargetFileName)" DestinationFolder="./$(ReleaseBuild)" />
5458
</Target>
5559

56-
<Target Name="DeepClean">
60+
61+
<Target Name="DeepClean" AfterTargets="Clean">
5762
<RemoveDir Directories="./bin" />
5863
<RemoveDir Directories="./obj" />
59-
<Delete Files="./$(TargetFileName)" />
64+
65+
66+
<ItemGroup>
67+
<FilesToDelete Include="$(ReleaseBuild)**/*" />
68+
</ItemGroup>
69+
70+
71+
<Delete Files="@(FilesToDelete)" />
6072
<Exec Command="dotnet restore" />
6173
</Target>
6274
</Project>

SessionHelpers.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ public static bool EnqueueStreamForTransmission(Session session, SyncMessage msg
3232
data.streamSendEvent.Set();
3333
}
3434

35+
36+
#if DEBUG
3537
Outflow.Debug($"Encoded StreamMessage with state #{msg.SenderStateVersion}");
38+
#endif
3639

3740
return isStream;
3841
}
@@ -72,7 +75,9 @@ public static void StreamLoop(Session session, AutoResetEvent ev, ConcurrentQueu
7275
session.NetworkManager.TransmitData(result.Encode());
7376

7477

78+
#if DEBUG
7579
Outflow.Debug($"Successfully processed StreamMessage #{result.SenderStateVersion}");
80+
#endif
7681
}
7782

7883

@@ -96,33 +101,41 @@ public static void RemoveStreamQueue(this Session session)
96101
if (SessionStreamQueue.ContainsKey(session))
97102
{
98103
SessionStreamQueue.TryRemove(session, out var _);
104+
105+
106+
#if DEBUG
99107
Outflow.Debug($"Removed StreamMessage queue");
108+
#endif
100109
}
101110
}
102111

103112

104113

105114
/// <summary>
106-
/// Adds a StreamMessage queue to the dictionary for use in other methods
115+
/// Adds a StreamMessage queue to the dictionary for a given session
107116
/// </summary>
108117
/// <param name="session">The session to add the queue for</param>
109118
/// <param name="ev">The event the queue processor will wait on</param>
110119
/// <param name="queue">The queue the processor will operate with</param>
111120
public static void AddStreamQueue(this Session session, AutoResetEvent ev, ConcurrentQueue<SyncMessage> queue)
112121
{
113122
SessionStreamQueue.TryAdd(session, (ev, queue));
123+
124+
125+
#if DEBUG
114126
Outflow.Debug($"Added StreamMessage queue");
127+
#endif
115128
}
116129

117130

118131

119132
/// <summary>
120-
/// Only called when the Session is disposed
133+
/// Only called when the Session is disposed, disposes of the StreamMessage processor
121134
/// </summary>
122135
/// <param name="session">The session to operate on</param>
123136
public static void DisposeStreamMessageProcessor(Session session)
124137
{
125-
if (SessionHelpers.SessionStreamQueue.TryGetValue(session, out var data))
138+
if (SessionStreamQueue.TryGetValue(session, out var data))
126139
data.streamSendEvent.Set();
127140

128141
Outflow.Msg("Properly shut down StreamMessage processing thread");

0 commit comments

Comments
 (0)