Skip to content

Commit abc366a

Browse files
arthurkehrwaldfreezy
authored andcommitted
Make PinmameGameLogicEngine.OnInit asynchronous
1 parent 1815bf6 commit abc366a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using System.Collections.Generic;
2323
using System.Linq;
2424
using System.Runtime.InteropServices;
25+
using System.Threading.Tasks;
2526
using NLog;
2627
using PinMame;
2728
using UnityEngine;
@@ -223,7 +224,7 @@ private void OnDestroy()
223224
_dmdLevels.Clear();
224225
}
225226

226-
public void OnInit(Player player, TableApi tableApi, BallManager ballManager)
227+
public Task OnInit(Player player, TableApi tableApi, BallManager ballManager)
227228
{
228229
string vpmPath = null;
229230
_ballManager = ballManager;
@@ -284,6 +285,8 @@ public void OnInit(Player player, TableApi tableApi, BallManager ballManager)
284285
} catch (Exception e) {
285286
Logger.Error(e);
286287
}
288+
289+
return Task.CompletedTask;
287290
}
288291

289292
public void ToggleSpeed()

0 commit comments

Comments
 (0)