Skip to content

Commit

Permalink
1.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicAglialoro committed Mar 14, 2023
1 parent 593d113 commit a18cec3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
8 changes: 2 additions & 6 deletions SRXDCustomVisuals.Plugin/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
using HarmonyLib;
using SMU.Utilities;
using SRXDCustomVisuals.Core;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Mathematics;
using UnityEngine;

namespace SRXDCustomVisuals.Plugin;
Expand All @@ -24,14 +21,14 @@ public class Patches {
private static NoteEventController noteEventController = new(11);
private static WaveformProcessor waveformProcessor = new();

private static void UpdateComputeBuffers(SpectrumProcessor spectrumProcessor, ComputeBuffer buffer) {
private static void UpdateComputeBuffers(ComputeBuffer buffer) {
var background = visualsBackgroundManager.CurrentBackground;

if (background != null && background.UseAudioSpectrum)
Shader.SetGlobalBuffer(SPECTRUM_BANDS_CUSTOM, buffer);

if (PlayerSettingsData.Instance.DisableEQ.GetBoolValue())
Shader.SetGlobalBuffer(SpectrumProcessor.SpectrumBands, spectrumProcessor.EmptySpectrumBuffer);
Shader.SetGlobalBuffer(SpectrumProcessor.SpectrumBands, GraphicsSystem.Instance.EmptySpectrumBuffer);
else
Shader.SetGlobalBuffer(SpectrumProcessor.SpectrumBands, buffer);
}
Expand Down Expand Up @@ -267,7 +264,6 @@ private static IEnumerable<CodeInstruction> SpectrumProcessor_CompleteTrackAnala
}).First()[0];

operations.Replace(match.Start, match.Length, new CodeInstruction[] {
new(OpCodes.Ldarg_0), // this
new(OpCodes.Ldarg_0), // this
new(OpCodes.Ldfld, SpectrumProcessor_computeBuffer),
new(OpCodes.Call, Patches_UpdateComputeBuffers)
Expand Down
2 changes: 1 addition & 1 deletion SRXDCustomVisuals.Plugin/PluginInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
public static class PluginInfo {
public const string Guid = "SRXD.CustomVisuals";
public const string Name = "CustomVisuals";
public const string Version = "1.2.1";
public const string Version = "1.2.2";
}
1 change: 0 additions & 1 deletion SRXDCustomVisuals.Plugin/Visuals/WaveformProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using GameSystems.TrackPlayback;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Mathematics;
using UnityEngine;
Expand Down

0 comments on commit a18cec3

Please sign in to comment.