input OSD: fix potentially absent P0
I don't know if there's any core that lacks non-player controls but this feels like the right thing to do anyway (for the future too)
This commit is contained in:
parent
fcff79e794
commit
3384ce8629
|
@ -18,8 +18,11 @@ namespace BizHawk.Client.Common
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
var controls = source.Definition.ControlsOrdered.ToList();
|
var controls = source.Definition.ControlsOrdered.ToList();
|
||||||
// index 0 is for controls that don't belong to any indexed player
|
// index 0 is for controls that don't belong to any indexed player
|
||||||
|
if (controls.ElementAtOrDefault(0) != null)
|
||||||
|
{
|
||||||
controls.Add(controls[0]);
|
controls.Add(controls[0]);
|
||||||
controls.RemoveAt(0);
|
controls.RemoveAt(0);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ((string buttonName, AxisSpec? axisSpec) in controls.SelectMany(x => x))
|
foreach ((string buttonName, AxisSpec? axisSpec) in controls.SelectMany(x => x))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue