@@ -42,10 +42,7 @@ public class PinMameGamelogicEngine : MonoBehaviour, IGamelogicEngine
42
42
public const string DmdPrefix = "dmd" ;
43
43
public const string SegDispPrefix = "display" ;
44
44
45
- public PinMameGame Game {
46
- get => _game ;
47
- set => _game = value ;
48
- }
45
+ public PinMameGame Game { get => _game ; set => _game = value ; }
49
46
50
47
[ HideInInspector ]
51
48
public string romId = string . Empty ;
@@ -174,6 +171,16 @@ private void Update()
174
171
OnLampChanged ? . Invoke ( this , new LampEventArgs ( _lamps [ changedLamp . Id ] . Id , changedLamp . Value ) ) ;
175
172
}
176
173
}
174
+
175
+ // gi
176
+ foreach ( var changedGi in _pinMame . GetChangedGIs ( ) ) {
177
+ if ( _lamps . ContainsKey ( changedGi . Id ) ) {
178
+ Logger . Info ( $ "[PinMAME] <= gi { changedGi . Id } : { changedGi . Value } ") ;
179
+ OnLampChanged ? . Invoke ( this , new LampEventArgs ( _lamps [ changedGi . Id ] . Id , changedGi . Value , LampSource . GI ) ) ;
180
+ } else {
181
+ Debug . Log ( $ "No GI { changedGi . Id } found.") ;
182
+ }
183
+ }
177
184
}
178
185
179
186
private void OnDisplayAvailable ( int index , int displayCount , PinMameDisplayLayout displayLayout )
@@ -277,7 +284,7 @@ private int OnAudioUpdated(IntPtr framePtr, int frameSize)
277
284
if ( _audioNumSamplesInput > 100000 ) {
278
285
var delta = AudioSettings . dspTime - _audioInputStart ;
279
286
var queueMs = System . Math . Round ( _audioQueue . Count * ( double ) _audioInfo . SamplesPerFrame / _audioInfo . SampleRate * 1000 ) ;
280
- Debug . Log ( $ "INPUT: { System . Math . Round ( _audioNumSamplesInput / delta ) } - { _audioQueue . Count } in queue ({ queueMs } ms)") ;
287
+ // Debug.Log($"INPUT: {System.Math.Round(_audioNumSamplesInput / delta)} - {_audioQueue.Count} in queue ({queueMs}ms)");
281
288
_audioInputStart = AudioSettings . dspTime ;
282
289
_audioNumSamplesInput = 0 ;
283
290
}
@@ -328,7 +335,7 @@ private void OnAudioFilterRead(float[] data, int channels)
328
335
_audioNumSamplesOutput += data . Length / channels ;
329
336
if ( _audioNumSamplesOutput > 100000 ) {
330
337
var delta = AudioSettings . dspTime - _audioOutputStart ;
331
- Debug . Log ( $ "OUTPUT: { System . Math . Round ( _audioNumSamplesOutput / delta ) } ") ;
338
+ // Debug.Log($"OUTPUT: {System.Math.Round(_audioNumSamplesOutput / delta)}");
332
339
_audioOutputStart = AudioSettings . dspTime ;
333
340
_audioNumSamplesOutput = 0 ;
334
341
}
0 commit comments