internal PinMameDisplayLayout(PinMameApi.PinmameDisplayLayout displayLayout, PinMameApi.PinmameHardwareGen hardwareGen) { Type = (PinMameDisplayType)displayLayout.type; Top = displayLayout.top; Left = displayLayout.left; Length = displayLayout.length; Width = displayLayout.width; Height = displayLayout.height; Depth = displayLayout.depth; Levels = null; if (!IsDmd) { return; } if (Depth == 2) { Levels = PinMameApi.PinmameDmdLevels.Wpc; } else { Levels = (hardwareGen & (PinMameApi.PinmameHardwareGen.SAM | PinMameApi.PinmameHardwareGen.SPA)) != 0 ? PinMameApi.PinmameDmdLevels.Sam : PinMameApi.PinmameDmdLevels.Gts3; } }
private void OnDisplayUpdatedCallback(int index, IntPtr framePtr, ref PinMameApi.PinmameDisplayLayout displayLayoutRef) { var displayLayout = new PinMameDisplayLayout(displayLayoutRef); Logger.Trace($"OnDisplayUpdatedCallback - index={index}, displayLayout={displayLayout}"); OnDisplayUpdated?.Invoke(index, framePtr, displayLayout); }
private void OnDisplayAvailableCallback(int index, int displayCount, ref PinMameApi.PinmameDisplayLayout displayLayoutRef) { var displayLayout = new PinMameDisplayLayout(displayLayoutRef, PinMameApi.PinmameGetHardwareGen()); Logger.Trace($"OnDisplayAvailableCallback - index={index}, displayCount={displayCount}, displayLayout={displayLayout}"); OnDisplayAvailable?.Invoke(index, displayCount, displayLayout); }
internal PinMameDisplayLayout(PinMameApi.PinmameDisplayLayout displayLayout) { Type = (PinMameDisplayType)displayLayout.type; Top = displayLayout.top; Left = displayLayout.left; Length = displayLayout.length; Width = displayLayout.width; Height = displayLayout.height; Depth = displayLayout.depth; Levels = null; }