Skip to content

Commit

Permalink
fix #4132
Browse files Browse the repository at this point in the history
controls that don't belong to any indexed player are put at index 0, which makes them appear in front of everything that's used all the time. when there's only a few of those, it's fine. but for systems with keyboards, you have to fullscreen the emulator window to even see regular inputs

I moved index 0 to the end for input display, but didn't touch the original generator, since it may affect other things I'm not sure about (and I'm not smart enough to properly change it)
  • Loading branch information
vadosnaprimer committed Dec 22, 2024
1 parent 1526de5 commit a836884
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/BizHawk.Client.Common/display/InputDisplayGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ public static string Generate(IController source)
throw new InvalidOperationException("Can't generate input display string with empty mnemonics cache");

var sb = new StringBuilder();
var controls = source.Definition.ControlsOrdered.ToList();
// index 0 is for controls that don't belong to any indexed player
controls.Add(controls[0]);
controls.RemoveAt(0);

foreach ((string buttonName, AxisSpec? axisSpec) in source.Definition.ControlsOrdered.SelectMany(x => x))
foreach ((string buttonName, AxisSpec? axisSpec) in controls.SelectMany(x => x))
{
if (axisSpec.HasValue)
{
Expand Down

3 comments on commit a836884

@YoshiRulz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when there are no player-0 buttons? Or will every core have either a Power or a Toggle Link button?

Also I thought I blocked commit messages like this >:(

@vadosnaprimer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I thought I blocked commit messages like this >:(

Explanation of what was done is not enough anymore?

@YoshiRulz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To answer my own question, the first list would be empty, not omitted. That's now documented.

re: commit messages, I want some info in the first line, if only to disambiguate it from other "fix #XXXX" commits.

Please sign in to comment.