Skip to content

Commit a4be05f

Browse files
committed
chore: Bump pinmame-dotnet to latest.
1 parent 8a0703a commit a4be05f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

VisualPinball.Engine.PinMAME.Unity/Runtime/PinMameGamelogicEngine.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using System.Collections.Generic;
1919
using System.Linq;
2020
using System.Runtime.InteropServices;
21-
using System.Text;
2221
using NLog;
2322
using PinMame;
2423
using UnityEngine;
@@ -105,13 +104,13 @@ public void OnInit(Player player, TableApi tableApi, BallManager ballManager)
105104
_pinMame = PinMame.PinMame.Instance(48000, @"D:\Pinball\Visual Pinball\VPinMAME");
106105
_pinMame.OnGameStarted += GameStarted;
107106
_pinMame.OnGameEnded += GameEnded;
108-
_pinMame.OnDisplayUpdate += DisplayUpdated;
109-
_pinMame.OnSolenoid += SolenoidChanged;
107+
_pinMame.OnDisplayUpdated += DisplayUpdated;
108+
_pinMame.OnSolenoidUpdated += SolenoidUpdated;
110109
_player = player;
111110

112111
try {
113-
//_pinMame.StartGame("fh_906h");
114-
_pinMame.StartGame(romId);
112+
_pinMame.StartGame("fh_906h");
113+
//_pinMame.StartGame(romId);
115114

116115
} catch (Exception e) {
117116
Logger.Error(e);
@@ -204,14 +203,14 @@ private void UpdateSegDisp(int index, PinMameDisplayLayout displayLayout, IntPtr
204203
Marshal.Copy(framePtr, _frameBuffer[index], 0, displayLayout.length * 2);
205204

206205
lock (_dispatchQueue) {
207-
Logger.Info($"[PinMAME] Seg data ({index}): {BitConverter.ToString(_frameBuffer[index])}" );
206+
//Logger.Info($"[PinMAME] Seg data ({index}): {BitConverter.ToString(_frameBuffer[index])}" );
208207
_dispatchQueue.Enqueue(() => OnDisplayFrame?.Invoke(this,
209208
new DisplayFrameData($"{DisplayPrefix}{index}", GetDisplayType(displayLayout.type), _frameBuffer[index])));
210209
}
211210

212211
}
213212

214-
private void SolenoidChanged(object sender, EventArgs e, int internalId, bool isActive)
213+
private void SolenoidUpdated(object sender, EventArgs e, int internalId, bool isActive)
215214
{
216215
if (_coils.ContainsKey(internalId)) {
217216
Logger.Info($"[PinMAME] <= coil {_coils[internalId].Id} ({internalId}): {isActive} | {_coils[internalId].Description}");
@@ -274,7 +273,8 @@ private void OnDestroy()
274273
_pinMame.StopGame();
275274
_pinMame.OnGameStarted -= GameStarted;
276275
_pinMame.OnGameEnded -= GameEnded;
277-
_pinMame.OnDisplayUpdate -= DisplayUpdated;
276+
_pinMame.OnDisplayUpdated -= DisplayUpdated;
277+
_pinMame.OnSolenoidUpdated -= SolenoidUpdated;
278278
}
279279
}
280280

VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="PinMame" Version="0.1.0-preview.18" />
20-
<PackageReference Include="PinMame.Native" Version="3.4.0-preview.189" />
19+
<PackageReference Include="PinMame" Version="0.1.0-preview.19" />
20+
<PackageReference Include="PinMame.Native" Version="3.4.0-preview.191" />
2121
<PackageReference Include="VisualPinball.Engine" Version="0.0.1-preview.43" />
2222
</ItemGroup>
2323

0 commit comments

Comments
 (0)