Skip to content

Commit 9b7398b

Browse files
committed
segdisp: Set correct display type when creating displays.
1 parent ec60bb6 commit 9b7398b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

VisualPinball.Engine.PinMAME.Unity/Editor/PinMameGamelogicEngineInspector.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ private void CreateDisplays(IEnumerable<DisplayAuthoring> sceneDisplays)
207207

208208
auth.Id = id;
209209
auth.NumChars = layout.Length;
210-
//auth.SegmentType = auth.ConvertSegmentType(layout.type);
210+
var displayFrameFormat = PinMameGamelogicEngine.GetDisplayType(layout.Type);
211+
auth.SegmentType = auth.ConvertSegmentType(displayFrameFormat);
211212

212213
go.name = $"Segment Display [{index}]";
213214
go.transform.localScale = new Vector3(DisplayInspector.GameObjectScale, DisplayInspector.GameObjectScale, DisplayInspector.GameObjectScale);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public void Switch(string id, bool isClosed)
300300
}
301301
}
302302

303-
private static DisplayFrameFormat GetDisplayType(PinMameDisplayType dp)
303+
public static DisplayFrameFormat GetDisplayType(PinMameDisplayType dp)
304304
{
305305
switch (dp) {
306306
case PinMameDisplayType.Seg8: // 7 segments and comma

0 commit comments

Comments
 (0)